in perl you would do
my $qselcat=$dbh->quote($selcat);
$whichpart = "AND key1=$qselcat";
Ren� Fournier wrote:
> Hello everyone,
>
> I'm trying to Select on a field that contains a doublequote, and can't
> figure out how to pass it throught the Select statement (couldn't find
> anything in the docs either...)
>
> -=-=-=-=-
>
> This doesn't work...
>
> $whichpart = "AND key1='$selcat'";
> $result = mysql_query("SELECT * FROM parts WHERE status='online'
> $whichpart",$db);
>
> ...when $selcat contains a double quote. For example, if I echo
> $selcat, I get:
>
> AND key1='36\" Core Shafts'
>
> ======
> I can see that mysql is choking on that double quote--do I need to
> convert it to something else? Thanks.
>
> ...Rene
>
> ---
> Ren� Fournier,
> [EMAIL PROTECTED]
>
> Toll-free +1.888.886.2754
> Tel +1.403.291.3601
> Fax +1.403.250.5228
> www.smartslitters.com
>
> SmartSlitters International
> #33, 1339 - 40th Ave NE
> Calgary AB T2E 8N6
> Canada
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php