Author Topic: some tables have results, some don't?  (Read 443 times)

0 Members and 1 Guest are viewing this topic.

Offline aebstractTopic starter

  • Devotee
  • Posts: 1,103
    • View Profile
some tables have results, some don't?
« on: February 11, 2010, 02:05:18 PM »
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.

Code: [Select]
$query = mssql_query("SELECT * FROM ordnn_Users");
while($r=mssql_fetch_array($query)){
echo "<pre>";
print_r($r);
echo "</pre>";
}


This will give me:

Code: [Select]
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:

Code: [Select]
$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:

Code: [Select]
$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:

Code: [Select]
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
There is an area of the mind that could be called unsane, beyond sanity, and yet
not insane. Think of a circle with a fine split in it. At one end there's
insanity. You go around the circle to sanity, and on the other end of the
circle, close to insanity, but not insanity, is unsanity.