DonH
Posts: 18
|
| Posted: 05/28/2011, 5:51 PM |
|
Hi..
I have a list box and contains six value, I want to review each user's specific elements using the WHERE IN.
I use the before show event, but the result is empty.
if (CCGetUserID() == 2) {
$db = new clsDBclassrom();
$SQL = "SELECT * FROM class WHERE id IN (1,3,5)";
$db->query($SQL);
$Result = $db->next_record();
}
Any ideas.
|
 |
 |
datadoit
|
| Posted: 05/28/2011, 5:57 PM |
|
Well the first thing that popped out at me is the field you're searching
(Name) looks like it might be a text field, whereas the array you're
presenting are integers.
|
|
|
 |
DonH
Posts: 18
|
| Posted: 05/29/2011, 5:14 AM |
|
It works.....

And without use the array, with before build select event and Where .= " id in (1,3,5).
Thank you for your post.
Best Regards.
Don
|
 |
 |
|