Jump to content

php can't count help!!!


ag3nt42

Recommended Posts

hello all,

 

i'm trying to use a count for one of my scripts and I can't figure out for the life of me why the count is way off..

 

here is the code:

<?php

// DO LOOP FOR ROOM OPTIONS
$RoomSQL="SELECT Description FROM [".$datatable."]";
$RoomResult=mssql_query($RoomSQL) or die (mssql_get_last_message());
$RoomCount=count(mssql_fetch_array($RoomResult));
echo($RoomCount);

?>

 

results in :

2

 

even tho there are 4 entrys in the database..wtf? is that?

 

Am i missing something?

 

thankz,

 

ag3nt42

Link to comment
https://forums.phpfreaks.com/topic/116058-php-cant-count-help/
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.