How do I insert a new row through MySQL if that table is already made, and some data/rows are already there?
| SitePoint Sponsor |
How do I insert a new row through MySQL if that table is already made, and some data/rows are already there?





If the row all ready has some of the fields filled in, just use the update query:The "whatevers" are, of course, just the data that you want to input and the <<id>> is the primary key field that specifies to what row you want to add the data.PHP Code:<?php
//update database
$update = @mysql_query(update <<tablename>> set <<field>>="whatever" and <<feild2>>="whatever" where <<id>>="something");
?>
Hope this helps.![]()
Colin Anderson
Ambition is a poor excuse for those without
sense enough to be lazy.
Bookmarks