I have this query that doesn't work properly:
$rs = $db->fetchArray("SELECT ".PX."objects.id,title,obj_ref_id,
obj_name,user_title,".PX."objects.udate,".PX."objects.cdate,
".PX."objects.cby,status
FROM ".PX."objects,".PX."objects_prefs,".PX."users
WHERE ".PX."objects.obj_ref_id=".PX."objects_prefs.obj_id
AND ".PX."objects.status='$status'
AND ".PX."objects.creator = ".PX."users.ID
AND ($user[ID] IN (obj_members))
ORDER by ".PX."objects.udate $order LIMIT $page,$user[view_lim]");
I held out the line in question above...if I insert the numbers that are in the table for obj_members it works just fine...
($user[ID] IN (36,1))
But if I use 'obj_members' as in the above it simply won't work. I've tried a variety of quotes around these things to no avail. I think it should work but perhaps logically it won't (which I don't get).
Any ideas?
thanks...