HITMAN 17 Posted February 10, 2008 Posted February 10, 2008 wat needs to be changed on this to be v2 <?php include "mysql.php"; global $c; mysql_query("UPDATE businesses SET bDAYSOLD=bDAYSOLD+1",$c); mysql_query("UPDATE users SET dib=dib+1 WHERE business >0",$c); $rra=mysql_query("SELECT * FROM businesses",$c); while($r=mysql_fetch_array($rra)) { $profitgt=$r['bPOPULATION']*1; mysql_query("UPDATE businesses SET bPROFIT=bPROFIT+$profitgt WHERE bID={$r['bID']}",$c); } $xd=mysql_query("SELECT * FROM businesses WHERE bPOPULATION<0",$c); while($p=mysql_fetch_array($xd)) { mysql_query("UPDATE users SET business=0 WHERE business={$p['bID']}",$c); } mysql_query("DELETE FROM businesses WHERE bPOPULATION<0",$c); ?> if someone can do it for me it wud be greatly appreciated Quote
carlg Posted February 10, 2008 Posted February 10, 2008 Re: Need Help Badly <?php include "globals.php"; global $c; db->query("UPDATE businesses SET bDAYSOLD=bDAYSOLD+1",$c); db->query("UPDATE users SET dib=dib+1 WHERE business >0",$c); $rra=db->query("SELECT * FROM businesses",$c); while($r=db->fetch_array($rra)) { $profitgt=$r['bPOPULATION']*1; db->query("UPDATE businesses SET bPROFIT=bPROFIT+$profitgt WHERE bID={$r['bID']}",$c); } $xd=include "db->query("SELECT * FROM businesses WHERE bPOPULATION<0",$c); while($p=db->fetch_array($xd)) { db->query("UPDATE users SET business=0 WHERE business={$p['bID']}",$c); } db->query("DELETE FROM businesses WHERE bPOPULATION<0",$c); ?> i think Quote
HITMAN 17 Posted February 10, 2008 Author Posted February 10, 2008 Re: Need Help Badly kyle your ace Quote
HITMAN 17 Posted February 10, 2008 Author Posted February 10, 2008 Re: Need Help Badly i just got this error now Error SQL query: ALTER TABLE `users` ADD `business` int( 11 ) NOT NULL default '0', ALTER TABLE `users` ADD `dib` int( 11 ) NOT NULL default '0', MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABLE `users` ADD `dib` int(11) NOT NULL default '0',' at line 2 also this error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a5069509/public_html/businesshome.php on line 8 Quote
Strats Posted February 10, 2008 Posted February 10, 2008 Re: Need Help Badly i just got this error now Error SQL query: ALTER TABLE `users` ADD `business` int( 11 ) NOT NULL default '0', ALTER TABLE `users` ADD `dib` int( 11 ) NOT NULL default '0', MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABLE `users` ADD `dib` int(11) NOT NULL default '0',' at line 2 also this error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a5069509/public_html/businesshome.php on line 8 SQL query: ALTER TABLE `users` ADD `business` int( 11 ) NOT NULL default '0', ALTER TABLE `users` ADD `dib` int( 11 ) NOT NULL default '0', Have you put them details in the dbase? Quote
iseeyou94056 Posted February 10, 2008 Posted February 10, 2008 Re: Need Help Badly <?php include "globals.php"; global $c; db->query("UPDATE businesses SET bDAYSOLD=bDAYSOLD+1",$c); db->query("UPDATE users SET dib=dib+1 WHERE business >0",$c); $rra=db->query("SELECT * FROM businesses",$c); while($r=db->fetch_array($rra)) { $profitgt=$r['bPOPULATION']*1; db->query("UPDATE businesses SET bPROFIT=bPROFIT+$profitgt WHERE bID={$r['bID']}",$c); } $xd=include "db->query("SELECT * FROM businesses WHERE bPOPULATION<0",$c); while($p=db->fetch_array($xd)) { db->query("UPDATE users SET business=0 WHERE business={$p['bID']}",$c); } db->query("DELETE FROM businesses WHERE bPOPULATION<0",$c); ?> i think thats wrong nice try tho try this <?php include "globals.php"; global $c; $db->query("UPDATE businesses SET bDAYSOLD=bDAYSOLD+1"); $db->query("UPDATE users SET dib=dib+1 WHERE business >0"); $rra=$db->query("SELECT * FROM businesses"); while($r=$db->fetch_row($rra)) { $profitgt=$r['bPOPULATION']*1; $db->query("UPDATE businesses SET bPROFIT=bPROFIT+$profitgt WHERE bID={$r['bID']}"); } $xd=include "$db->query("SELECT * FROM businesses WHERE bPOPULATION<0); while($p=$db->fetch_row($xd)) { $db->query("UPDATE users SET business=0 WHERE business={$p['bID']}"); } $db->query("DELETE FROM businesses WHERE bPOPULATION<0"); ?> Quote
carlg Posted February 10, 2008 Posted February 10, 2008 Re: Need Help Badly poo i i was sure i was missing something lol Quote
HITMAN 17 Posted February 10, 2008 Author Posted February 10, 2008 Re: Need Help Badly i just got this error now Error SQL query: ALTER TABLE `users` ADD `business` int( 11 ) NOT NULL default '0', ALTER TABLE `users` ADD `dib` int( 11 ) NOT NULL default '0', MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABLE `users` ADD `dib` int(11) NOT NULL default '0',' at line 2 also this error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a5069509/public_html/businesshome.php on line 8 SQL query: ALTER TABLE `users` ADD `business` int( 11 ) NOT NULL default '0', ALTER TABLE `users` ADD `dib` int( 11 ) NOT NULL default '0', Have you put them details in the dbase? no as i get this error SQL query: ALTER TABLE `users` ADD `business` int( 11 ) NOT NULL default '0', ALTER TABLE `users` ADD `dib` int( 11 ) NOT NULL default '0', MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABLE `users` ADD `dib` int( 11 ) NOT NULL default '0',' at line 2 Quote
parelem Posted February 11, 2008 Posted February 11, 2008 Re: Need Help Badly ALTER TABLE `users` ADD `business` int( 11 ) NOT NULL default '0', ALTER TABLE `users` ADD `dib` int( 11 ) NOT NULL default '0'; Quote
HITMAN 17 Posted February 11, 2008 Author Posted February 11, 2008 Re: Need Help Badly ALTER TABLE `users` ADD `business` int( 11 ) NOT NULL default '0', ALTER TABLE `users` ADD `dib` int( 11 ) NOT NULL default '0'; so shud that work now Quote
Klikoka Posted February 11, 2008 Posted February 11, 2008 Re: Need Help Badly wat needs to be changed on this to be v2 <?php include "mysql.php"; global $c; mysql_query("UPDATE businesses SET bDAYSOLD=bDAYSOLD+1",$c); mysql_query("UPDATE users SET dib=dib+1 WHERE business >0",$c); $rra=mysql_query("SELECT * FROM businesses",$c); while($r=mysql_fetch_array($rra)) { $profitgt=$r['bPOPULATION']*1; mysql_query("UPDATE businesses SET bPROFIT=bPROFIT+$profitgt WHERE bID={$r['bID']}",$c); } $xd=mysql_query("SELECT * FROM businesses WHERE bPOPULATION<0",$c); while($p=mysql_fetch_array($xd)) { mysql_query("UPDATE users SET business=0 WHERE business={$p['bID']}",$c); } mysql_query("DELETE FROM businesses WHERE bPOPULATION<0",$c); ?> if someone can do it for me it wud be greatly appreciated Learn To Fu**ing Convert For Fu**s Sake Quote
HITMAN 17 Posted February 11, 2008 Author Posted February 11, 2008 Re: Need Help Badly cool the sql wont work for some reason and i get that error Quote
iseeyou94056 Posted February 11, 2008 Posted February 11, 2008 Re: Need Help Badly hahahaha lol Quote
HITMAN 17 Posted February 11, 2008 Author Posted February 11, 2008 Re: Need Help Badly stop using this topic to spam Quote
Klikoka Posted February 11, 2008 Posted February 11, 2008 Re: Need Help Badly LOL LMAO Your The One That Spams Every Other Topic Quote
Ghetto Posted February 11, 2008 Posted February 11, 2008 Re: Need Help Badly <?php include "globals.php"; global $c; db->query("UPDATE businesses SET bDAYSOLD=bDAYSOLD+1",$c); db->query("UPDATE users SET dib=dib+1 WHERE business >0",$c); $rra=db->query("SELECT * FROM businesses",$c); while($r=db->fetch_array($rra)) { $profitgt=$r['bPOPULATION']*1; db->query("UPDATE businesses SET bPROFIT=bPROFIT+$profitgt WHERE bID={$r['bID']}",$c); } $xd=include "db->query("SELECT * FROM businesses WHERE bPOPULATION<0",$c); while($p=db->fetch_array($xd)) { db->query("UPDATE users SET business=0 WHERE business={$p['bID']}",$c); } db->query("DELETE FROM businesses WHERE bPOPULATION<0",$c); ?> i think thats wrong nice try tho try this <?php include "globals.php"; global $c; $db->query("UPDATE businesses SET bDAYSOLD=bDAYSOLD+1"); $db->query("UPDATE users SET dib=dib+1 WHERE business >0"); $rra=$db->query("SELECT * FROM businesses"); while($r=$db->fetch_row($rra)) { $profitgt=$r['bPOPULATION']*1; $db->query("UPDATE businesses SET bPROFIT=bPROFIT+$profitgt WHERE bID={$r['bID']}"); } $xd=include "$db->query("SELECT * FROM businesses WHERE bPOPULATION<0); while($p=$db->fetch_row($xd)) { $db->query("UPDATE users SET business=0 WHERE business={$p['bID']}"); } $db->query("DELETE FROM businesses WHERE bPOPULATION<0"); ?> Nice try but the script only includes mysql.php so you don't need to include the globals.php Try this: <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $db->query("UPDATE businesses SET bDAYSOLD=bDAYSOLD+1"); $db->query("UPDATE users SET dib=dib+1 WHERE business >0"); $rra=$db->query("SELECT * FROM businesses"); while($r=$db->fetch_row($rra)) { $profitgt=$r['bPOPULATION']*1; $db->query("UPDATE businesses SET bPROFIT=bPROFIT+$profitgt WHERE bID={$r['bID']}"); } $xd=include "$db->query("SELECT * FROM businesses WHERE bPOPULATION<0); while($p=$db->fetch_row($xd)) { $db->query("UPDATE users SET business=0 WHERE business={$p['bID']}"); } $db->query("DELETE FROM businesses WHERE bPOPULATION<0"); ?> And obviously use you cron code to use it. Quote
HITMAN 17 Posted February 11, 2008 Author Posted February 11, 2008 Re: Need Help Badly ye but the database sql error keeps coming up also i get this error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a5069509/public_html/businesshome.php on line 8 Quote
iseeyou94056 Posted February 11, 2008 Posted February 11, 2008 Re: Need Help Badly stop using this topic to spam you spam every topic and if it was not about you you would not even say anything Quote
HITMAN 17 Posted February 11, 2008 Author Posted February 11, 2008 Re: Need Help Badly well stop talking about me im trying to learn to code and all u do is be horrible Quote
YoungGold Posted February 11, 2008 Posted February 11, 2008 Re: Need Help Badly well stop talking about me im trying to learn to code and all u do is be horrible awww..the truth hurting you....and you say i spammed to get my credits up....you think credits actually bother me at the moment O_o Quote
iseeyou94056 Posted February 11, 2008 Posted February 11, 2008 Re: Need Help Badly well stop talking about me im trying to learn to code and all u do is be horrible thats because u say ppl are spamming and u are the one spamming and because you are getting annoying calling people noobs and stuff mate U ARE THE BIGGEST NOOB ON CE i am sorry to be a ass but for 1 thing i am in a bad mood and you are annoying me making it worse Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.