edpatterson
IS-IT--Management
- Feb 24, 2005
- 186
I can not seem to be able to either find the correct search criteria to locate the answer here or a way to get a query to return selected rows from an access database.
This works
$sql = 'SELECT last_name, first_name, middle_initial FROM names';
$result = odbc_exec($dbconn, $sql);
(loop to display the names)
This does not work
$sql = 'SELECT last_name, first_name, middle_initial FROM names WHERE last_name = "Smith"';
$result = odbc_exec($dbconn, $sql);
(loop to display the names)
I have tried numerous variations on quoting Smith, and yes, there are last names in the table equal Smith
Any and all help will be appreciated.
This works
$sql = 'SELECT last_name, first_name, middle_initial FROM names';
$result = odbc_exec($dbconn, $sql);
(loop to display the names)
This does not work
$sql = 'SELECT last_name, first_name, middle_initial FROM names WHERE last_name = "Smith"';
$result = odbc_exec($dbconn, $sql);
(loop to display the names)
I have tried numerous variations on quoting Smith, and yes, there are last names in the table equal Smith
Any and all help will be appreciated.