I have a db/table which I query with a "huge" query string, and it's different each time it run ... And it also grows over time. So, is there any upper limit how large a query string can be? Sample: $MySQL = " SELECT id, title, name FROM table WHERE id <> '4' AND id <> '9' AND id <> '11' AND id <> '15' AND id <> '18' AND id <> '43' AND id <> '101' AND id <> '151' AND id <> '198' AND id <> '314' AND id <> '1104' AND id <> '12665' AND id <> '14334' AND ... a lot more same as above ... can be several hundred, and growing ... AND verified = '1' ORDER BY title ASC";
THANK'S !! Looks like I can use MB size queries So, I'm not in any trouble with some hundreds or even thousands of lines !
There's 2 ways of dealing with this. The best method is to make another table with excluded id's. SELECT columns FROM my_table WHERE id NOT IN (SELECT id FROM exclude_these_ids_table); The other is to use something like this, but you will eventually run into the same problems. SELECT id, title, name FROM table WHERE id NOT IN('4','9','11','15',......);