Mysql join two tables and limit by first input?
You can use something like this:

select * from 
(select * from table1 limit 3) t1
join table2 t2 on t2.uid = t1.id


You can check it: http://sqlfiddle.com/#!2/1a534/7