Re: mysql select query after adding slashes to input

From: Date: Tue, 07 May 2002 20:16:10 +0000
Subject: Re: mysql select query after adding slashes to input
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19028@lists.php.net to get a copy of this message
You have to escape the slashes since they're in the database... 'Test\\\'cal\\\\\\' =) -Szi ----- Original Message ----- From: "CJ" <calistusj@hotmail.com> To: <php-db@lists.php.net> Sent: Tuesday, May 07, 2002 4:22 PM Subject: [PHP-DB] mysql select query after adding slashes to input > the contents of the the table is as follows > +-------+---------------+---------------+-----+-------------+------------+-- > --------+--------+ > | calid | name | stage_name | sex | zodiac_sign | > yrs_involved | yrs_finals | tentid | > +-------+---------------+---------------+-----+-------------+------------+-- > --------+--------+ > | 45 | Test\'cal\"\" | Test\'cal\"\" | M | > 1 > | 0 | 0 | 1 | > +-------+---------------+---------------+-----+-------------+------------+-- > --------+--------+ > > i used the php function addslashes() on the data before adding it to the > database. > > when i run a query as follows: > mysql> select * from cal where stage_name=' Test\'cal\"\" '; > > i get no results. > > any suggestions? really need help urgently. > thanks > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#19028) next »