Re: Subject: MySQL general Question...

From: Date: Fri, 16 Jan 2004 18:55:47 +0000
Subject: Re: Subject: MySQL general Question...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-32460@lists.php.net to get a copy of this message
There is no difference, in the way you wrote it. However, if you used wildcards you could match as follows : SELECT & FROM my_table WHERE 'email' LIKE '%@hotmail.com' // Match all addresses at hotmail.com SELECT & FROM my_table WHERE 'email' LIKE '123@%' // Match all user names beginning with 123@ SELECT & FROM my_table WHERE 'email' LIKE '12_@hotmail.com' // Match all users having email address beginning 12 [0-9,a-z, any other character] @ hotmail.com SELECT & FROM my_table WHERE 'email' LIKE '%@hotmail.___' // Match all users at hotmail.com, hotmail.net, hotmail.biz but *not* hotmail.info // because ___ (3 underscores) matches any 3 characters but not any 4 characters. Cheers - Neil. At 14:45 16/01/2004 +0000, you wrote:
To: php-db@lists.php.net MIME-Version: 1.0 Message-ID: <OF4BED6C3F.7DA671B4-ON80256E1D.00506432-80256E1D.0050D813@risk.sungard.com> From: Tristan.Pretty@risk.sungard.com Date: Fri, 16 Jan 2004 14:39:59 +0000 Content-Type: multipart/alternative;
    boundary="=_alternative 0050D81280256E1D_="
Subject: MySQL general Question... What's teh diffence between 'LIKE' & '=' EG: SELECT & FROM my_table WHERE 'email' LIKE '123@hotmail.com' I've just purchased an E-mail marketing piece of software, and was peakign in the code... Found that... Never seen it before (Have I been living in a box?) Cheers, Tris...
======================================================== CaptionKit http://www.captionkit.com : Production tools for accessible subtitled internet media, transcripts and searchable video. Supports Real Player, Quicktime and Windows Media Player. VideoChat with friends online, get Freshly Toasted every day at http://www.fresh-toast.net : NetMeeting solutions for a connected world.

« previous php.db (#32460) next »