note 17119 deleted from function.mysql-fetch-object by zak

From: Date: Tue, 27 Nov 2001 08:04:54 +0000
Subject: note 17119 deleted from function.mysql-fetch-object by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21315@lists.php.net to get a copy of this message
Actually the syntax should be: SELECT COUNT(*) AS total FROM users; >When selecting with a count/sum, the >field must be named. >select count(*) from users; >becomes >select count(*) "total" from users; >This way the result can be referenced >as: >$row->total;

« previous php.notes (#21315) next »