Question
January 3, 2008 at 08:38 AM
branty1970

PHP with Access ODBC

by branty1970 . Updated 18 years, 8 months ago

I have a simple PHP based website with an ODBC connection to an Access database. I want to query the database to find all contacts whose lastname begins with the letter A. This command works in Access but won’t work through the ODBC connector. Anyone got any suggestions as to how I could make it work?

SELECT * FROM Contacts WHERE LastName Like ‘A*’

I’ve also tried to more correct SQL version:

SELECT * FROM Contacts WHERE LastName BEGINS WITH ‘A’ but not surprisingly that fails because the BEGINS WITH command isn’t supported by MS.

I’m using PHP 5, IIS 6, Windows Server 2003 and an Access 2002 database. All latest patches and fixes are installed for Windows and IIS.

Thanks,
Martin.

This discussion is locked

All Comments