Jump to content
MakeWebGames

Recommended Posts

Posted

Hello,

I've looked all around on here for gang age but cant find anything about it... And I think my cron is wrong because it's not updating the database...

I have the following for gang age...

$db->query("UPDATE gangs SET daysold=daysold+1, boxes_opened=0");

 

Would that be right?

or would it be something like this...

 

$db->query("UPDATE gangs SET daysold=daysold+1 WHERE gangID > 0");

 

??

Posted

None are them are right. Why?

Because your SET is wrong & WHERE(Second query). Your setting `daysold` wrong. What will that be setting? Users or Gang? And your where doesn't need to be `gangID`. I think something might come up if it's an invalid gang ID, so you might want to change that. :)

I think it should be something like this:

$db->query("UPDATE `users` SET `daysingang` = `daysingang` + 1 WHERE `gang` > 0"); // Should work 

 

Reply back if this helps. ;)

Posted

lol thanks for the reply waz I figured it out it was

$db->query("UPDATE gangs SET daysold=daysold+1");

 

just needed to delete the other crap lol.

I have gang age and also members time in gang... thats why i used UPDATE gangs... :-)

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...