Jump to content
MakeWebGames

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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?

Posted

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");
?>
Posted

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

Posted

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

Posted

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.

Posted

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

Posted

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

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...