I am trying to create a way to read more than 200 records from a MySQL db. However the plugin throws an error unless I include a LIMIT statement like: “LIMIT 200”.
In MySQL you can combine an offset into limit like so: “LIMIT 0, 200” however I get an error when I write this as mentioned above.
You can also use OFFSET in MySQL - however it seems that when I use a variable it is being entered into the SQL statement as text - even though I have specified the variable is a number. As a result MySQL throws an error. So this works:
SELECT * FROM table_name WHERE owner_id = 11 LIMIT 100 OFFSET 0 but this doesn’t:
SELECT * FROM table_name WHERE owner_id = ? LIMIT 100 OFFSET ?where the two parameters are defined.
Any ideas about how to solve this?