From: Don S. <do...@se...> - 2002-10-29 14:52:07
|
I haven't seen the function code, but have you looked at this: http://pear.php.net/manual/en/core.db.tableinfo.php I'm not sure that only works after you've executed a query and when you need to know the column names. Don. On Tue, 29 Oct 2002, Matthew McNaney wrote: > While rewriting the sqlImport function, I needed a way to grab the column > names of a table. > > I remember someone telling me that the 'show columns' command is MySQL > specific. So I wrote a function named getColumnNames($tableName). > > You pass it the name of the table and it returns an array of all the names. > > Give me a +1 amen and I will commit it or gimme a damnation -1 and tell me > if there is an easier way that I haven't located. > > Thanks, > Matt > > Matthew McNaney > Internet Systems Architect > Electronic Student Services > Email: ma...@tu... > URL: http://phpwebsite.appstate.edu > Phone: 828-262-6493 > ICQ: 141057403 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > > |