NYCPHP Meetup

NYPHP.org

[nycphp-talk] OT: Quick MySQL Syntax Question

Daniel Convissor danielc at analysisandsolutions.com
Mon Dec 5 23:04:57 EST 2005


Hey Anthony:

On Mon, Dec 05, 2005 at 09:45:47PM -0600, Anthony Papillion wrote:
> 
> SELECT * FROM sisters WHERE email !='email_address_to_exclude' ORDER BY
> RAND() LIMIT 1"

You'll want to use <>.


On Mon, Dec 05, 2005 at 10:50:56PM -0500, CED wrote:
> IS NOT LIKE

LIKE is for wildcard matching and when inverted is NOT LIKE.

Anthony, and everyone, the manual is your friend.  There's a whole section 
on comparison operators:
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list