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??? ??? Quote Link to comment 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. ??? Quote Link to comment 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 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.