Re: Get a list of column field names from a MS Access table
| From: | Jim Lucas | Date: | Sat, 28 Feb 2009 21:28:09 +0000 |
| Subject: | Re: Get a list of column field names from a MS Access table | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-288991@lists.php.net to get a copy of this message | ||
revDAVE wrote:
Newbie question: I would like to get a list of column field names from a MS Access table and hopefully get them returned in the ORIGINAL order (as they appear in access) Is there a sql query I could do to get this result? -- Thanks - RevDave Cool @ hosting4days . com [db-lists 09]Since I have never tried accessing Access from PHP I did some research. I found these examples on how to access Access... http://devzone.zend.com/article/4065-Reading-Access-Databases-with-PHP-and-PECL http://stackoverflow.com/questions/126513/php-and-ms-access-number-of-records-returned-by-select-query I also found this nice page: http://php.net/manual/en/function.odbc-columns.php what extension(s) are you using to access your DB. If it is odbc, then I see no problem accessing Access schema information. http://php.net/manual/en/function.odbc-columns.php#81227 will show you how... -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare