trying to run a query in workbench that will cycle thru all of the site_ids and test my query against each of them. this should be easy but i'm missing something.
SET @user_id = 449;
SET @getsites.site_id = 11;
WHILE(@getsites.site_id < 535) DO
SELECT routine goes here
SET @getsites.site_id = @getsites.site_id + 1;
END WHILE;
select ... from table where user_id = 449 and site_id between 11 and 534?select ... between 11 and 272andselect ... between 273 and 534. See which one fails. If first one fails, runselect ... between 11 and 142andselect ... between 143 and 272and so on. That's like binary search and you might find the problem in fewer steps than running sequentially looking for failures.