NYCPHP Meetup

NYPHP.org

[nycphp-talk] OT: Quick MySQL Syntax Question

CED Consult at CovenantEDesign.com
Mon Dec 5 23:14:35 EST 2005


IS NOT LIKE will function completely fine within the code he displayed
below, see Hans' reply.

Cheers.

----- Original Message -----
From: "Daniel Convissor" <danielc at analysisandsolutions.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Monday, December 05, 2005 11:04 PM
Subject: Re: [nycphp-talk] OT: Quick MySQL Syntax Question


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
_______________________________________________
New York PHP Talk Mailing List
AMP Technology
Supporting Apache, MySQL and PHP
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org




More information about the talk mailing list