yanti Posted July 8, 2009 Share Posted July 8, 2009 hi guys...i want to update specific for one rows not all. any idea? Link to comment https://forums.phpfreaks.com/topic/165149-update-one-rows/ Share on other sites More sharing options...
josborne Posted July 8, 2009 Share Posted July 8, 2009 I'm not totally sure what you mean. It seems like you are trying to figure out how to specify a particular row within a table. If so, you just need to have something that is unique to that row to tell MySQL to look for. Usually, this is the primary key. Can you show us the table structure and maybe explain the details of the update you are trying to make? You can use SHOW CREATE TABLE to get the table structure. I apologize if I have totally misunderstood and oversimplified your problem. Link to comment https://forums.phpfreaks.com/topic/165149-update-one-rows/#findComment-870825 Share on other sites More sharing options...
yanti Posted July 8, 2009 Author Share Posted July 8, 2009 ok..i display data from database....so now i want to update each rows. so that i can choose which rows i want to update. Link to comment https://forums.phpfreaks.com/topic/165149-update-one-rows/#findComment-870828 Share on other sites More sharing options...
corbin Posted July 8, 2009 Share Posted July 8, 2009 Look into WHERE clauses. Link to comment https://forums.phpfreaks.com/topic/165149-update-one-rows/#findComment-870831 Share on other sites More sharing options...
yanti Posted July 8, 2009 Author Share Posted July 8, 2009 this is current code mysql_query("UPDATE `topik` SET valid='0' WHERE `id`='$_GET[id]'",$con); Link to comment https://forums.phpfreaks.com/topic/165149-update-one-rows/#findComment-870836 Share on other sites More sharing options...
fenway Posted July 15, 2009 Share Posted July 15, 2009 And what's wrong with that? Link to comment https://forums.phpfreaks.com/topic/165149-update-one-rows/#findComment-875977 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.