IwnfuM Posted September 20, 2010 Share Posted September 20, 2010 hello , i want to do something like that but im not really sure how to make it done. mysql_query("INSERT INTO `table` (`field1`) WHERE `field2`='".$variable1."' VALUES ('".$variable2."')"); in short , i want to insert something to 1 field only if in the other field equals to some variable. thanks , Mor. Link to comment https://forums.phpfreaks.com/topic/213899-insert/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 20, 2010 Share Posted September 20, 2010 INSERT queries, insert a new row. It sounds like you want an UPDATE query. http://w3schools.com/php/php_mysql_update.asp Link to comment https://forums.phpfreaks.com/topic/213899-insert/#findComment-1113268 Share on other sites More sharing options...
IwnfuM Posted September 20, 2010 Author Share Posted September 20, 2010 oh right , the UPDATE syntax. thanks lot , Mor. Link to comment https://forums.phpfreaks.com/topic/213899-insert/#findComment-1113271 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.