コード例 #1
0
ファイル: utils.php プロジェクト: paultag/puzzle-editing
function getPuzzleStatusCounts()
{
    return get_assoc_array("SELECT pstatus, COUNT(*) AS pcount FROM puzzle_idea GROUP BY pstatus", "pstatus", "pcount");
}
コード例 #2
0
ファイル: dbquery.php プロジェクト: freemanb/site-info-dash
function get_postcnt_abs()
{
    $result = mysql_query("SELECT b.post_title, SUM(a.count)\n\t\t\t FROM wp_3xvgq6_Counterize_Pages a, wp_3xvgq6_posts b\n\t\t\t WHERE a.postID = b.ID AND (post_type = 'post' or post_type = 'page')\n\t\t\t GROUP BY b.post_title ORDER BY SUM(a.count) DESC");
    return get_assoc_array($result, 'post_title', 'SUM(a.count)');
}