almightyegg Posted June 24, 2007 Share Posted June 24, 2007 <? include 'db.php'; $update = "UPDATE topics SET fid = 'gdis' WHERE pinned='No'"; $up = mysql_query($update) or die(mysql_error()); if(!$up){ echo "WHYYYY!!!?!?!?!"; }else{ echo "Woop!"; } ?> It echoes out Woop! therefore meaning it's worked, but looking in my PHPmyAdmin table it hasn't changed. I can't edit it in PHPmyAdmin because it is currently getting errors when deleting/updating/creating things. So what's wrong with the script??? ??? Link to comment https://forums.phpfreaks.com/topic/56980-solved-update-problem/ Share on other sites More sharing options...
bigbob Posted June 24, 2007 Share Posted June 24, 2007 Make sure this line is correct: $update = "UPDATE topics SET fid = 'gdis' WHERE pinned='No'"; Make sure you are updating the correct table and you are looking in your MySQL for the correct table. You may have intended to write this: $update = "UPDATE some_other_table SET fid = 'gdis' WHERE pinned='No'"; Or you're looking in the wrong table in the PhpMyAdmin. Sorry, cant see anything wrong with that code. ??? Link to comment https://forums.phpfreaks.com/topic/56980-solved-update-problem/#findComment-281463 Share on other sites More sharing options...
almightyegg Posted June 24, 2007 Author Share Posted June 24, 2007 I believe it is an error with PhpMyAdmin now. I went back and tried editting them again with phpmyadmin and this time it let me, when I went back to make sure I'd imputted them correctly, they were still the same as before....it's just not updating information Link to comment https://forums.phpfreaks.com/topic/56980-solved-update-problem/#findComment-281470 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.