It's mainly the "Show region" that produces the message "There is an error in your SQL syntax." in the browser. I've recreated the page and only started getting the issue when I placed a "MySQLi Show If Not First Page" on the "Previous" link. I removed that and then it errored on "MySQLi Display Total Records". Deleted and replaced total records and that worked fine, so I've added the problematic show region code again and am sending the page to see if it errors with you.