I'm kind of confused, maybe someone knows why this would be acting the way it is. So, from the previous post, I have gathered information so I know what tables I have in my database. Now I'm wanting to go in to certain tables and look at what columns/information are in them.
$query = mssql_query("SELECT * FROM ordnn_Users");
while($r=mssql_fetch_array($query)){
echo "<pre>";
print_r($r);
echo "</pre>";
}
This will give me:
Array
(
[0] => 1
[UserID] => 1
[1] => OR_host
[Username] => OR_host
[2] => Host
[FirstName] => Host
[3] => Account
[LastName] => Account
[4] => 1
[IsSuperUser] => 1
[5] =>
[AffiliateId] =>
[6] => host
[Email] => host
[7] => Host Account
[DisplayName] => Host Account
[8] => 0
[UpdatePassword] => 0
)
Array
(
...so on and so on
Now, I want to try this with another table:
$query = mssql_query("SELECT * FROM aspnet_Membership");
while($r=mssql_fetch_array($query)){
echo "<pre>";
print_r($r);
echo "</pre>";
}
This returns a blank page.
My original query that gave me my list was:
$query = mssql_query("SELECT * FROM information_schema.tables");
while($r=mssql_fetch_array($query))
{
echo "<pre>";
print_r($r[2]);
echo "</pre>";
}
Which gave me a lot of results, but here are the two sections that contain the two tables I have referenced so far:
Array
(
[0] => outlawracingcom
[TABLE_CATALOG] => outlawracingcom
[1] => dbo
[TABLE_SCHEMA] => dbo
[2] => ordnn_Users
[TABLE_NAME] => ordnn_Users
[3] => BASE TABLE
[TABLE_TYPE] => BASE TABLE
)
Array
(
[0] => outlawracingcom
[TABLE_CATALOG] => outlawracingcom
[1] => dbo
[TABLE_SCHEMA] => dbo
[2] => aspnet_Membership
[TABLE_NAME] => aspnet_Membership
[3] => BASE TABLE
[TABLE_TYPE] => BASE TABLE
)
Kinda has me confused