I’m trying to edit a query and add LIMIT to it and it’s taking a while. Can you help me out a little?
Here’s the working query:
$result = mysql_query("SELECT * FROM events INNER JOIN event_performers ON events.ID = event_performers.eventID WHERE event_performers.performerID = '898' ORDER BY events.ID");
I want to add LIMIT ' . $offset . ', ' . $rowsPerPage to it but am getting errors.
Thanks in advance.
Limit should be placed at last like, “SELECT * FROM your_table LIMIT 0, 10” 0 is offset and 10 is row per page, may be it should be