RE: Problem with script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




from the brief error message your provided, I think its blowing up on the single quote contained in the word "can't". you need to handle this by choosing one a few of these methods


replace all single quotes with two single quotes

$text = str_replace("'","''", $text);

addslashes function
$text = addslashes($text);

or mysql_real_escape_string($sql);

bastien

From: renato.linux@xxxxxxxxxxxxxxxxxxx
To: php-db@xxxxxxxxxxxxx
Subject:  Problem with script
Date: Tue, 2 Nov 2004 10:41:35 -0600 (CST)

Hi all, greetings from Phoenix, Arizona!
I'm having a problem with a PHP script and the database it manages.
I'm having his error message:

Query failed: You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
't read card','1099413551')' at line 1

I don't know what is happening, usually the database works well but
sometimes this strange error appears. I'm sending you the scripts in where
I think the error could be.

Any suggestion or comment will be very appreciated.

Thanks

Renato
<< submit_temp.php >>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux