Re: [PHP] update entries in a table
Thank you so much. Norman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] update entries in a table
On Friday, April 12, 2002, at 05:35 PM, Erik Price wrote: >> How do I update entries in MySQL? Say for example, I checked some >> fields to >> a table, and decided to make update to a particular field. How do I do >> that >> in PHP? > > // $db = database connection handler > $update_sql = "UPDATE tablename SET tablename.columname = '$value'"; > > if (!mysql_query($update_sql, $db)) { > die("Could not process update SQL query"); > } > Of course, as an afterthought, you might want to qualify that with a WHERE clause, lest you update every row of your table... Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] update entries in a table
On Friday, April 12, 2002, at 05:23 PM, Norman Zhang wrote: > How do I update entries in MySQL? Say for example, I checked some > fields to > a table, and decided to make update to a particular field. How do I do > that > in PHP? // $db = database connection handler $update_sql = "UPDATE tablename SET tablename.columname = '$value'"; if (!mysql_query($update_sql, $db)) { die("Could not process update SQL query"); } Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] update entries in a table
Take a look at: http://www.mysql.com/doc/U/P/UPDATE.html It'll have everything you'll ever want to know about UPDATE :) Rick "There is no such thing as a sudden heart-attack. It takes years of preparation." - Unknown > From: "Norman Zhang" <[EMAIL PROTECTED]> > Date: Fri, 12 Apr 2002 14:23:28 -0700 > To: [EMAIL PROTECTED] > Subject: [PHP] update entries in a table > > Hi, > > How do I update entries in MySQL? Say for example, I checked some fields to > a table, and decided to make update to a particular field. How do I do that > in PHP? > > Regards, > Norman > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php