note 44126 deleted from function.count by tomsommer

From: Date: Thu, 15 Jul 2004 17:02:18 +0000
Subject: note 44126 deleted from function.count by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73314@lists.php.net to get a copy of this message
Note Submitter: ---- I ran into this problem and I hope it helps other beginners out. If you're trying to use count() with mysql_fetch_array() you will get 2x as many elements (columns/length) returned. ie: If I have 2 columns 'lastname', 'firstname" I would get count() = 4. I believe this is because it returns both a numberic and an associative array by default. I used mysql_fetch_row() and I get the corrent number (in this example = 2). I haven't tried it with passing a 2nd parameter to fetch_array because I'd rather use the original function. Cheers

« previous php.notes (#73314) next »