![]() ![]() |
| kryles |
Mar 13 2008, 03:19 PM
Post
#1
|
|
Novice ![]() ![]() Group: Members Posts: 21 Joined: 30-November 07 Member No.: 4,437 |
Hi,
I have a mysql statement that looks like CODE SELECT pID,pName,pImage FROM products WHERE pSection = 'sectionID' AND pDisplay = '1' AND pName NOT IN('bubble','bobbole','rewjd') Is this supposed to give me all values not in the list provided or have I missed something? It is actually running in PHP code but it does not seem to filter out the specified values. Thanks, [since this is html I didn't post the PHP code, but I can if you want] |
| kryles |
Mar 14 2008, 12:24 PM
Post
#2
|
|
Novice ![]() ![]() Group: Members Posts: 21 Joined: 30-November 07 Member No.: 4,437 |
CODE $query = " SELECT pID,pName,pImage FROM products WHERE pSection = '".$sectionID."' AND pDisplay = '1' AND pName <> '".$rs['pName']."' AND pName NOT IN(".$boughtString.") ORDER BY RAND() LIMIT 1"; I am not even sure why this works. But it seems to. |
| Brian Chandler |
Mar 14 2008, 02:10 PM
Post
#3
|
|
Jocular coder ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,431 Joined: 31-August 06 Member No.: 43 |
QUOTE I am not even sure why this works. But it seems to. Have you looked in the manual? Or are you just doing guesswork? |
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st November 2009 - 03:23 AM |