Re: Partly matching a field (Slightly 0T)

From: Date: Wed, 14 Apr 2004 23:49:16 +0000
Subject: Re: Partly matching a field (Slightly 0T)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-183394@lists.php.net to get a copy of this message
On Wed, 2004-04-14 at 19:45, Ryan A wrote: > Hi, > I have a field "client_id" in the database and I have a search from where > the client can enter the client_id to match from the database and then > return the accounts details. > > Later on we had to tack a --<crap> after the client id, > eg: if the original client id was: > sadf_234 > > after the "tack" it becomes: > sadf_234--abcdef > > The client of course does not know about the extra bits we have added as its > for some internal functions, all he will do a > search on is sadf_234 > > I have tried to do this using the LIKE condition in my SQL statement but I > think I got the syntax a bit wrong coz its not working.... > > Feeling totally braindead...a little help appreciated. ... WHERE client_id LIKE 'sadf_234%' ... HTH, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'

« previous php.general (#183394) next »