Error in SQL Syntax
Whenever I attempt to add a "Display Record Count" to a working page designed to search for and delete found records, the record set is changed and gives a "Error in SQL Syntax" error. The recordset's WHERE statement is changed from "WHERE registrants.LastName = varLastName" to "WHERE registrants.LastName = %s LIMIT 1" which causes the error. If I manually change the WHERE statement back, the error goes away but the page's search and delete functions get broken. The more I try to resolve this, the more 'broken' the page becomes - becomming a vicious cycle. If I remove the code for the "DIsplay Record Count" and reset the recordset, the page works again.
The same thing happens whenever I try to add "Recordset Paging" to an otherwise working page. I'm convinced these two elements of the MySQLi extension are faulty.
I am attaching the page for you to review. Any suggestions?