However, if you used wildcards you could match as follows :
SELECT & FROM my_table WHERE 'email' LIKE '%@xxxxxxxxxxx' // 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_@xxxxxxxxxxx'
// Match all users having email address beginning 12 [0-9,a-z, any other character] @ hotmail.com
SELECT & FROM my_table WHERE 'email' LIKE '%@xxxxxxxxxxx'
// 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@xxxxxxxxxxxxx
MIME-Version: 1.0
Message-ID: <OF4BED6C3F.7DA671B4-ON80256E1D.00506432-80256E1D.0050D813@xxxxxxxxxxxxxxxx>
From: Tristan.Pretty@xxxxxxxxxxxxxxxx
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@xxxxxxxxxxx'
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.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php