ag3nt42 Posted July 22, 2008 Share Posted July 22, 2008 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 More sharing options...
ag3nt42 Posted July 22, 2008 Author Share Posted July 22, 2008 nvrm i think i shoul be using num_rows.. thanks Link to comment https://forums.phpfreaks.com/topic/116058-php-cant-count-help/#findComment-596769 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.