cfgcjm Posted January 23, 2008 Share Posted January 23, 2008 I'm looking to create a sql statement in php that says Insert into the table 'users' column 'client' value $client where column 'username'=$username I've got this: mysql_query("INSERT INTO users (client) VALUES ('$client')"); but i'm not quite sure how to do the where part Link to comment https://forums.phpfreaks.com/topic/87417-insert-into-help/ Share on other sites More sharing options...
beebum Posted January 23, 2008 Share Posted January 23, 2008 mysql_query("INSERT INTO users (client) VALUES ('$client') WHERE username=$username"); Link to comment https://forums.phpfreaks.com/topic/87417-insert-into-help/#findComment-447165 Share on other sites More sharing options...
revraz Posted January 23, 2008 Share Posted January 23, 2008 This was already resolved in the PHP Help forum. Link to comment https://forums.phpfreaks.com/topic/87417-insert-into-help/#findComment-447168 Share on other sites More sharing options...
fenway Posted January 24, 2008 Share Posted January 24, 2008 mysql_query("INSERT INTO users (client) VALUES ('$client') WHERE username=$username"); Maybe... but the above won't work. Link to comment https://forums.phpfreaks.com/topic/87417-insert-into-help/#findComment-447983 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.