everlifefree Posted January 27, 2008 Share Posted January 27, 2008 Alright here my code and it will change one query that it find by id, but I'd like to reset the whole all querys to 0 not just one. Help?? Here's my current code. // HANDLE REMOVE REQUEST /////////////////////////////////////////// if (isset($_GET["rm"]) && $deleteMe == "1" ) {myQ("DELETE FROM `[x]gallery` WHERE `id` = {$_GET["rm"]}");} elseif (isset($_GET["new"]) && $deleteMe1 == "1" ) {myQ("UPDATE `[x]gallery` SET `views` = '0' WHERE `id` ={$_GET["new"]}");} else {} Quote Link to comment https://forums.phpfreaks.com/topic/88097-solved-change-all-querys/ Share on other sites More sharing options...
toplay Posted January 27, 2008 Share Posted January 27, 2008 Removing the WHERE clause from the query will update all rows in a table. Quote Link to comment https://forums.phpfreaks.com/topic/88097-solved-change-all-querys/#findComment-450729 Share on other sites More sharing options...
everlifefree Posted January 27, 2008 Author Share Posted January 27, 2008 Well then whats the url i use to call it with out a where? Quote Link to comment https://forums.phpfreaks.com/topic/88097-solved-change-all-querys/#findComment-450754 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.