seany123 Posted October 9, 2008 Share Posted October 9, 2008 basically i just need this script to update certain values in my database. in my players database i want to update $money - 1000 and $city_id = 2. <?php include("lib.php"); define("PAGENAME", "Travel2"); ?> <? { $query = $db->execute("update `players` set `money`=?, `city_id`=? where `id`=?", array($player->money - 1000, $player->city_id = 2, $player->id)); } ?> ive tried this but it doesnt work. Also at the of the code i want it to Automatically direct to home.php Link to comment https://forums.phpfreaks.com/topic/127778-help-with-something-simple/ Share on other sites More sharing options...
jordanwb Posted October 10, 2008 Share Posted October 10, 2008 Why do you have curly brackets? Link to comment https://forums.phpfreaks.com/topic/127778-help-with-something-simple/#findComment-661553 Share on other sites More sharing options...
iversonm Posted October 10, 2008 Share Posted October 10, 2008 post your execute function without we dont know whats wrong Link to comment https://forums.phpfreaks.com/topic/127778-help-with-something-simple/#findComment-661588 Share on other sites More sharing options...
jordanwb Posted October 10, 2008 Share Posted October 10, 2008 Plus can you be more specific with what's wrong. Link to comment https://forums.phpfreaks.com/topic/127778-help-with-something-simple/#findComment-661953 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.