I am having problems with entering data into MySQL from a PHP script. I am
taking the data from an array generated by a CSV parsing routine. That in
itself works great, however I have large number of data units with '-'
characters in (hyphens) and it is causing the SQL queries to dump out with
sure, lots of way, regex replacement, str_replace, etc
but its strange that a hyphen is causing an error.
can you post some code?
Bastien
From: Mark Benson [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] Hyphens and MySQL
Date: Fri, 28 Jan 2005 14:21:34 +
I am having problems
Mark Benson wrote:
I am having problems with entering data into MySQL from a PHP script. I am
taking the data from an array generated by a CSV parsing routine. That in
itself works great, however I have large number of data units with '-'
characters in (hyphens) and it is causing the SQL
On Fri, 2005-01-28 at 14:21 +, Mark Benson wrote:
Is there an easy way to search and replace/remove characters in a string in
PHP?
www.php.net/str_replace , www.php.net/preg_replace . You can strip out
the - characters with str_replace(-, , $string);
--
Josip Dzolonga,
dzolonga at mt dot