LIMIT by row field
Posted: Thu Feb 19, 2009 9:44 am
I have a table which says how many rows to pull out the database. However, instead of having to do a query to get the row limit and then perform the actual query, I would like to combine the query. However, I don't think MySQL allows for this. Example of what I would like to do is below:
Code: Select all
SELECT a.field,
FROM `a_table` a, `b_table` b
WHERE b.table_id = a.table_id
LIMIT b.limit