note 37274 deleted from function.mysql-query by philip
| From: | philip@php.net | Date: | Wed, 06 Apr 2005 18:08:12 +0000 |
| Subject: | note 37274 deleted from function.mysql-query by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-87606@lists.php.net to get a copy of this message | ||
Note Submitter: (Art)
----
hey
**
Adding this note in for others who are new to updating data using PHP (like me)
if you are to update data in your database using PHP and you are using variables in your UPDATE sql
statement, remember to keep in the single quotes around each variable otherwise the data will not be
updated.
$sql = "
UPDATE public
SET field1 = '$var1', field2 = '$var2', field3 = '$var3'
WHERE ID = $varID
";
thought this might help the random searcher