NYCPHP Meetup

NYPHP.org

[nycphp-talk] OT: Quick MySQL Syntax Question

CED Consult at CovenantEDesign.com
Mon Dec 5 22:50:56 EST 2005


IS NOT LIKE
  ----- Original Message ----- 
  From: Anthony Papillion 
  To: NYPHP Talk 
  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20051205/fffe643c/attachment.html>


More information about the talk mailing list