RE: [PHP-DB] MS SQL 7

From: Date: Sun, 07 Oct 2001 06:57:42 +0000
Subject: RE: [PHP-DB] MS SQL 7
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13077@lists.php.net to get a copy of this message
Try this... I'm using it from Unix (FreeTDS interface, sybase functions), but it should work identical on windoze/iis/whatever. $db = mssql_connect(server,login,passwd); $q = mssql_query("sp_tables",$db); echo "<TABLE>\n<TR>"; $tmp = mssql_fetch_array($q); while (list($k,$v) = each($tmp)) if (!is_int($k)) echo "<TH>$k</TH>"; echo "</TR>\n"; mssql_data_seek($q,0); while ($tmp = mssql_fetch_row($q)) { echo "<TR>"; while (list($k,$v) = each($tmp)) echo "<TD>$v</TD>"; echo "</TR>\n"; } echo "</TABLE>\n"; mssql_free_result($q); mssql_close($db); Hope this helps, -- Troy Settle Pulaski Networks 540.994.4254 - 866.477.5638 http://www.psknet.com ** -----Original Message----- ** From: Ermanno Iannacci [mailto:ermannov@libero.it] ** Sent: Friday, October 05, 2001 3:23 AM ** To: frank@frontbase.com ** Cc: php-db@lists.php.net ** Subject: Re: [PHP-DB] MS SQL 7 ** ** ** Which way? ** I've tried with mssql_query, but it didn't work. ** Thanks. ** ** > ---------- Initial message ----------- ** > ** > From : "Frank M. Kromann" <frank@frontbase.com> ** > To : Ouster <ermannov@libero.it> ** > Cc : <php-db@lists.php.net> ** > Date : Thu, 04 Oct 2001 12:17:18 -0700 ** > Subject : Re: [PHP-DB] MS SQL 7 ** > ** > If your storred procedure returns a result set you can get it with ** the mssql_functions as well. ** > ** > If the precedure returns values or output parameters you will need ** php 4.0.7 (or current cvs). The updated version of php_mssql.dll ** includes three new functions aimed for storred procedures. ** > ** > - Frank ** > ** > > Is there a way to retrieve records from a stored procedure with MS ** SQL 7? ** > > I've tried but I couldn't get anything. ** > > I read on the PHP bug site that I can only use SELECT statement, ** but ODBC ** > > should work; is that true? ** > > ** > > Thanks ** > > ** > > ** > > -- ** > > PHP Database Mailing List (http://www.php.net/) ** > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net ** > > For additional commands, e-mail: php-db-help@lists.php.net ** > > To contact the list administrators, e-mail: php-list- ** admin@lists.php.net ** > > ** > > ** > > ** > ** > ** > ** > ** ** Sempre 'n testa 'a ranocchia gialla. ** ** ** -- ** PHP Database Mailing List (http://www.php.net/) ** To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net ** For additional commands, e-mail: php-db-help@lists.php.net ** To contact the list administrators, e-mail: php-list-admin@lists.php.net ** **

« previous php.db (#13077) next »