note 21219 added to function.substr-count

From: Date: Fri, 03 May 2002 16:44:09 +0000
Subject: note 21219 added to function.substr-count
Groups: php.notes 
Request: Send a blank email to php-notes+get-30128@lists.php.net to get a copy of this message
how do i get back a total count from a specific field? meaning i want to get back total posts,posts perday,& users percent of total posts posted on my forum something like this right? $countposts = mysql_query("SELECT posts, count(*) AS count from {$db_prefix}members group by posts"); $posts = mysql_fetch_array($countposts); $totalposts = $posts; $percentoftotalposts = (round(($memsettings[6] / $totalposts[count]) * 100,2)); $postsperday = "$memsettings[6]"; $postsperday = sprintf("%.2f",($memsettings[6]) / ($memsettings[14])); memsettings[6] is predefined and works the only one im trying to retrieve is totalposts how do i do this? also how would i retrieve this from a function using these variables? -- http://www.php.net/manual/en/function.substr-count.php http://master.php.net/manage/user-notes.php?action=edit+21219 http://master.php.net/manage/user-notes.php?action=delete+21219 http://master.php.net/manage/user-notes.php?action=reject+21219

« previous php.notes (#30128) next »