dachshund Posted February 12, 2010 Share Posted February 12, 2010 hi i have the following $sql = "INSERT INTO `content` (`title`, `wordsby`, `indeximage`, `maincontent`, `information`, `section`, `type`, `date`, `tag_one`, `tag_two`, `tag_three`, `link`) VALUES ('$title', '$words_by', '$indeximageaddress', '$article', '$information', '$section', '$type', '$date', '$tag_one', '$tag_two', '$tag_three', '$link')"; but i want it to be inserted inter into `content` WHERE id LIKE '$id' but it won't me do that. i have the get id as well $id=mysql_real_escape_string($_GET['id']); Link to comment https://forums.phpfreaks.com/topic/191888-insert-into-already-existing-id/ Share on other sites More sharing options...
sader Posted February 12, 2010 Share Posted February 12, 2010 UPDATE table SET `field1`='value1', `field2`='value2' WHERE id=$id LIMIT 1; Link to comment https://forums.phpfreaks.com/topic/191888-insert-into-already-existing-id/#findComment-1011412 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.