Re: Re: database question

From: Date: Thu, 29 Nov 2001 12:49:25 +0000
Subject: Re: Re: database question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-76028@lists.php.net to get a copy of this message
> $word = 'bingo'; > $sql = "SELECT a_column FROM table WHERE text_column LIKE '%$word%'; > $res = mysql_query($sql); > // etc... for displaying results > > Resuming: > % on the beggining - doesn't matter what comes before > % on the end - doesn't matter what comes after Yes, which means that all these following examples would lead to match: abingo bingob abingob So, this might lead to unwanted match.. -- | ,_, Jani Mikkonen, bofh and proud of it, +358456700349 |(O,O) http://www.mikkonen.org/jani |( ) Pgp public key @ http://www.mikkonen.org/jani/keyh.html +-"-"-------] Life is unfair but root passwords makes it bareable |

Attachment: [application/pgp-signature]
« previous php.general (#76028) next »