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 {} 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. 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? Link to comment https://forums.phpfreaks.com/topic/88097-solved-change-all-querys/#findComment-450754 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.