Re: search for person by comparing his data with data in mysql

From: Date: Sun, 21 Dec 2008 05:51:22 +0000
Subject: Re: search for person by comparing his data with data in mysql
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-284902@lists.php.net to get a copy of this message
On Sat, Dec 20, 2008 at 7:01 AM, Jochem Maas <jochem@iamjochem.com> wrote: > ceo@l-i-e.com schreef: >> select >> first_name like '%$first_name%' >> + 3 * last_name like '%$last_name%' >> + 7 * email = '$email' >> as score, > > that works?? I guess the expressions (e.g. email = '$email') > evaluate to bools and are auto-cast to ints. > > Im guess there needs to be some parenthesis in there somewhere, no? > > anyway nice snippet :-) > If it works, it must be a MySQL "feature". Andrew

« previous php.general (#284902) next »