lucky3809 Posted August 28, 2010 Posted August 28, 2010 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"); ?? Quote
Wazam Posted August 28, 2010 Posted August 28, 2010 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. ;) Quote
lucky3809 Posted August 28, 2010 Author Posted August 28, 2010 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... :-) Quote
Wazam Posted August 28, 2010 Posted August 28, 2010 Hmm.. My query should still work, but oh well. Glad to hear that. :) Quote
rulerofzu Posted August 28, 2010 Posted August 28, 2010 Your query would only update the user waz and how long they have been in a gang not how old the gang is. Quote
Wazam Posted August 28, 2010 Posted August 28, 2010 Ahhh Facepalm.. That you ROZ, I don't the complete opposite what he wanted. ¬_¬ (Deserve a Pimp slap) 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.