Asperon Posted August 28, 2007 Share Posted August 28, 2007 so if I want to to do an insert query on a specific already created row, would the syntax be like this? mysql_query = "INSERT INTO coupons(paid,location) VALUES('0','$location') WHERE couponID='$couponID'"; thus paid and location information is inserted in to the coupons table with the rows that have $couponID as a their couponID right? or is there a different way that you are supposed to do it? Link to comment https://forums.phpfreaks.com/topic/67125-solved-quick-query-question/ Share on other sites More sharing options...
Asperon Posted August 28, 2007 Author Share Posted August 28, 2007 I wasn't getting any answers in the mysql forum so I came here, but I guess its busy today at phpfreaks.. Link to comment https://forums.phpfreaks.com/topic/67125-solved-quick-query-question/#findComment-336652 Share on other sites More sharing options...
Jessica Posted August 28, 2007 Share Posted August 28, 2007 No, you do an UPDATE, not an INSERT. Link to comment https://forums.phpfreaks.com/topic/67125-solved-quick-query-question/#findComment-336654 Share on other sites More sharing options...
Asperon Posted August 28, 2007 Author Share Posted August 28, 2007 I thought there was something else other than insert but I couldn't seem to find it, thank you Link to comment https://forums.phpfreaks.com/topic/67125-solved-quick-query-question/#findComment-336656 Share on other sites More sharing options...
Asperon Posted August 28, 2007 Author Share Posted August 28, 2007 so would it be $query_add = "UPDATE coupons SET location='$location' WHERE couponID='$couponID'"; ?? Link to comment https://forums.phpfreaks.com/topic/67125-solved-quick-query-question/#findComment-336666 Share on other sites More sharing options...
Jessica Posted August 28, 2007 Share Posted August 28, 2007 Yep. Link to comment https://forums.phpfreaks.com/topic/67125-solved-quick-query-question/#findComment-336670 Share on other sites More sharing options...
Asperon Posted August 28, 2007 Author Share Posted August 28, 2007 thank you Link to comment https://forums.phpfreaks.com/topic/67125-solved-quick-query-question/#findComment-336673 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.