Re: Re: MSSQL DataObject - support for listing tables in mssql.php
| From: | Alan Knowles | Date: | Fri, 10 Jan 2003 15:00:17 +0000 |
| Subject: | Re: Re: MSSQL DataObject - support for listing tables in mssql.php | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-12239@lists.php.net to get a copy of this message | ||
looks like this query is in DB_msql::getSpecialQuery(), however it doesnt include the uid=user_id('......') bit.
Alan Knowles wrote:
Actually, The original comment was based around the old way I used to gather table data : being describe tables..... now it uses pear's $db->tableInfo(); which is in DB/mssql.php which appears to just raise an error.. I've passed this on to sterling (cc'ing pear-dev)- as he's listed as the author for that file... To see if he thinks the code below is valid to go into mssql.php to allow it to support table listing.. Regards Alan Mike Carter wrote:-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comHi Alan, After a bit of research here's how to find out a list of tables in MSSQL server: SELECT name FROM sysobjects WHERE uid=user_id('<USERNAME SPECIFIED IN DATAOBJECT .ini DSN>') AND type = 'u' ORDER BY name The user_id is set to the same person who logs in and creates the tables on the server - so it's important to use the same account for accessing and creating stuff in the database. Regards,