Hi Change your WHERE statement to
WHERE stns.stns_id=1 AND table.ent_nws_id <> "3" ' HTH Peter ----------------------------------------------- Excellence in internet and open source software ----------------------------------------------- Sunmaia www.sunmaia.net [EMAIL PROTECTED] tel. 0121-242-1473 ----------------------------------------------- > -----Original Message----- > From: Mike [mailto:[EMAIL PROTECTED]] > Sent: 10 April 2002 22:24 > To: mysql list > Subject: Help w/Query > > > Hi, > > I've been trying to find some info on running a select statement > that would > return a few rows and leave out one specific row. > Here is my select statement: > > $result = mysql_query("SELECT > ent_nws_id,img_path,substring_index(ent_body, \".\" ,1) AS ent_body FROM > stns,images INNER JOIN ent_nws ON stns.stns_id=ent_nws.stns_id and > images.img_id=ent_nws.img_id WHERE stns.stns_id=1",$db); > > I'd like to leave out say row ent_nws_id=3. I didn't see any function like > EXCEPT in the manual and I'm not sure if NOT is the right function to use > because haven't been able to get it to work. Any help would be greatly > appreciated. > > Thanks in advance, > Mike > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.330 / Virus Database: 184 - Release Date: 2/28/02 > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php