$colname_rs_txtSearchFirstname = $_POST['txt_search'];
$sql_rs_txtSearch = sprintf("SELECT * FROM staffstu WHERE lastname = %s OR
firstname = %s ORDER BY lastname, firstname ASC",
GetSQLValueString($colname_rs_txtSearchFirstname, "text",
$colname_rs_txtSearchFirstname, "text"));
It always gives
mysql_error
If I do not use "sprintf" that's working fine. I can't find the solution.