Re: php selecting problem

From: Date: Sun, 02 Nov 2003 04:20:00 +0000
Subject: Re: php selecting problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-168317@lists.php.net to get a copy of this message
On Sun, 2 Nov 2003 00:06:46 +0100, you wrote: >if($bok==1) >{$query = "select compno,thCompany from main_company where thCompany LIKE >'%0123456789%'";} > >I have looked in the DB and i see quite a few companies have a number in the >beginning, but still this returns me no rows....any ideas why? That query is looking for any record where thCompany includes the text "0123456789" at any point. Compare "LIKE '1%'" and read the chapter on string comparison functions in the MySQL manual.

« previous php.general (#168317) next »