Hi again

It is solved I used $value="'".urlencode($value)."'"
And urldecode for showing the data.

Thanks everybody for the help.

Later,
            Jorge Giménez

----- Original Message -----
From: Jorge Giménez Mayorgas <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 29, 2001 11:33 AM
Subject: Fw: [PHP-DB] Special character on an INSERT statement


> Hi again.
>
> I'm still trying but I can't do it.
>
> I have tried this :
>
> $values=$values.addslashes("'".$value).addslashes("'");
> The result of this would be something like this
> INSERT INTO Carrocerias VALUES (\'Ber\',\' Berlina\')
> The mysql_errno is 1064.
>
> I've tried mysql_escape_tring with the same result.
> Before INSERT statement I put this
> mysql_escape_string("\");
> but it didn't work.
>
> Can anyone where I could found an example ? I have looked on the online
> manual of php but they are SELECT examples, there are no INSERT examples.
>  I ' m a newbie PHP programmer .
>
> Thanks again,
>
>                         Jorge Giménez
>
> ----- Original Message -----
> From: "Jorge Giménez Mayorgas" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 28, 2001 6:48 PM
> Subject: [PHP-DB] Special character on an INSERT statement
>
>
> Hi .
>
> I'm trying to do this on an INSERT statement.
>
> $sql= "INSERT .... (' TONS OF CD'S ')
> or any phrase with the character ' .
> Obviously it gives an error when execeting mysql_query.
>
> How can I do it ?
>
> Thanks,
>
>             Jorge Giménez
>
>
>

Reply via email to