NYCPHP Meetup

NYPHP.org

[nycphp-talk] OT: Quick MySQL Syntax Question

Anthony Papillion papillion at gmail.com
Mon Dec 5 23:00:18 EST 2005


Ahhh, thank you very much!

On 12/5/05, CED <Consult at covenantedesign.com> wrote:
>
> IS NOT LIKE
>
> ----- Original Message -----
> *From:* Anthony Papillion <papillion at gmail.com>
> *To:* NYPHP Talk <talk at lists.nyphp.org>
> *Sent:* Monday, December 05, 2005 10:45 PM
> *Subject:* [nycphp-talk] OT: Quick MySQL Syntax Question
>
> Hello Everyone,
>
> I know this is off-topic but this problem is driving me totally nuts and I
> am hoping somone here will take a moment to answer this post:
>
> I have a db table called 'sisters'. I am wanting to select ONE RANDOM
> record from that table but I want to exclude a specific record from that
> random selection. Here is the sql I'm using:
>
> SELECT * FROM sisters WHERE email !='email_address_to_exclude' ORDER BY
> RAND() LIMIT 1"
>
> However, every time I insert my WHERE clause, I am told by MySQL that
> there is an error in my syntax. I've replaced the != with NOT and it makes
> no difference. Can anyone tell me what I'm doing wrong?
>
> Thanks!
> Anthony Papillion
> Phone: (918) 926-0139
> ICQ: 96-698-595
>
> CAN ONE VOICE CHANGE THE WORLD?
> http://www.one.org
>
> ------------------------------
>
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
>
>
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
>
>


--
Anthony Papillion
Phone: (918) 926-0139
ICQ: 96-698-595

CAN ONE VOICE CHANGE THE WORLD?
http://www.one.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20051205/16702bcf/attachment.html>


More information about the talk mailing list