trying to return a recordset where the first letter of a field value is a predetermined letter of the alphabet:
$data = mysql_query("SELECT * FROM physicians WHERE Left(lastName, 1) = '$sv'
This almost seems to work but is buggy. I have database records where ‘lastName’ starts with an ‘s’, but will not show up if I throw ‘s’ or ‘S’ at this query as the value of the $sv variable.
If I re-enter that record in the database, i may or may not get that record to show up when i pass “s”.
The records are in there because if I run a different query on a different field, they show up…
I’m sure there’s more to returning query results alphabetically that i’m missing… can anyone help?
My field type is varchar if that helps…