From: Pasi <pa...@ik...> - 2004-02-13 10:47:10
|
Hello! I'm using phpwebsite version 0.9.3-1-full. When you go to remove an announcement, and in the confirmation phase press submit (Yes-button), this is what I have in the apache logs: "GET /index.php?module=announce&ANN_op=delete&ANN_id=125 HTTP/1.0" 200 11843" "POST /index.php HTTP/1.0" 200 11427 http://server/index.php?module=announce&ANN_op=delete&ANN_id=125" And in the mysql logs I see this: 1333 Query select * from mod_announce where id = '125' 1323 Query delete from mod_announce where id = '125' 1323 Query delete from mod_fatcat_elements where module_title = 'announce' and module_id = 125 As you can see, everything goes OK. BUT, if you press submit (Yes-button) _many times_ in the confirmation phase (because the delete operation can take some time if the server is heavily loaded, and the user thinks that nothing is happening..), this is what happens: "GET /index.php?module=announce&ANN_op=delete&ANN_id=125 HTTP/1.0" 200 11843" "POST /index.php HTTP/1.0" 200 11427 http://server/index.php?module=announce&ANN_op=delete&ANN_id=125" "POST /index.php HTTP/1.0" 200 11427 http://server/index.php?module=announce&ANN_op=delete&ANN_id=125" "POST /index.php HTTP/1.0" 200 11427 http://server/index.php?module=announce&ANN_op=delete&ANN_id=125" and in the mysql.. not so nice things: 1333 Query select * from mod_announce where id = '125' 1333 Query delete from mod_announce where id = NULL 1333 Query delete from mod_fatcat_elements where module_title = 'announce' And quess what? All the announcements are gone from the pages! The delete-query above deletes ALL the categories from the ALL announcements! Any ideas how to fix this? This bug happens every time I try this.. It looks like the "and module_id =" is "optimized" away because the module_id is NULL :) causing ALL the stuff to be deleted.. -- Pasi Kärkkäinen ^ . . Linux / - \ Choice.of.the .Next.Generation. |