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 Quote 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"); Quote 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. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/87417-insert-into-help/#findComment-447983 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.