Re: MSSQL DataObject - support for listing tables in mssql.php

From: Date: Fri, 10 Jan 2003 14:43:30 +0000
Subject: Re: MSSQL DataObject - support for listing tables in mssql.php
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12237@lists.php.net to get a copy of this message
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:
Hi 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,
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.dev (#12237) next »