ADN Posted September 14, 2008 Share Posted September 14, 2008 I saw an example of hospital crimes here : http://criminalexistence.com/ceforums/i ... ic=17197.0 But, i need something more complicated. SO, i create in "crimes" table, crimeHTEXT, crimeHTIME, crimeHREASON. I modify my staff_crimes.php to add/edit a crime with hospital reason, time & text (and my database updates with hospital info). Now, i take the code from Toxication, and he is look like that : else { print $r['crimeHTEXT']; $chance=rand(1,2); if ($chance == 1) { $hospital=rand(2,7); mysql_query("UPDATE users SET hospital=$r[crimeHTIME], hospreason=$r[crimeHREASON] WHERE userid=$userid"); } if ($chance == 2) { $jail=rand(2,7); { print $r['crimeFTEXT']; } mysql_query("UPDATE users SET jail=$r[crimeJAILTIME], jail_reason=$r[crimeJREASON] WHERE userid=$userid"); } } I mention that crimeHTIME and crimeHREASON exist in "crimes" and hospital & hospreason exist in "users". If i failure a crime, and the text say i should be in hospital, well, my database is not updating. I can still do crimes untill my brave go to 0. Any ideea what is wrong ? Quote Link to comment Share on other sites More sharing options...
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.