Jump to content

some tables have results, some don't?


aebstract

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/191809-some-tables-have-results-some-dont/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.