'SELECT * FROM (SELECT * FROM t1
RIGHT OUTER JOIN t2 ON t1.wid = t2.wid
WHERE t2.wid IS NULL)
LIMIT ' . $number;
This SQL lines do not give not one row back and I do not know the reason. The t1 is full of rows while the t2 is an empty table.