I use the code below to show tables in my database.
I get "Connected to a database", but nothing else. Is my code correct? Can I use another way to get the information I need?
<?php $link = mssql_connect('HOST', 'user', 'pass'); if (!$link || !mssql_select_db('dbname', $link)) { die('Unable to connect or select database!'); }else{ echo"Connected to database"; } $v = mssql_query("Select name from sysobjects where type like 'u'"); $row = mssql_fetch_array($v); echo "<br>"; echo $row[0]; echo "<br>"; mssql_free_result($v); ?>
source share