PHP MySQL insert
| From: | Jon | Date: | Thu, 18 Aug 2005 16:56:18 +0000 |
| Subject: | PHP MySQL insert | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-220879@lists.php.net to get a copy of this message | ||
Please help with an insert problem.
Sometimes $data1 could have a comma and that messes up the insert. how do I
get around that?
$query = "insert into testtable6 (indx, col1, col2) values (NULL, '$data1',
'$data2')";
mysql_db_query("testdb", $query);