The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Desperate for help with query using IN condition...
I'm trying to debug this alll day, if anyone can help i'll be very very happy.
My query is as follows: PHP Code:
taskid name taskfilter --------------------------------------------- 1 foo 4,13,22 2 baa 5,3,101 3 moo 3 4 goo 1,56,87 and so on... my problem is that I need my result from the query to contain only rows that DO NOT have the value 3 in the taskfilter column so I only want rows 1 and 4 to return. problem is that row 1 is being excluded as well, since there's a 3 in the number 13. What am i missing here? |
#2
|
|||
|
|||
Untested...
Code:
$sql = $db->query_read(" SELECT * FROM " . TABLE_PREFIX . "task AS task WHERE NOT FIND_IN_SET('3', task.taskfilter) > 0 ORDER BY task.name ASC "); |
#3
|
||||
|
||||
Thank you Calorie... that worked perfectly
|
#4
|
||||
|
||||
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|