私はデータベース内のすべての情報を取得してクエリを実行していますが、私がしようとしている行を 'x'を持つすべてのエントリを取得し、列に「y」を持つすべてのエントリを取得し、それらをグループ化します。sqlクエリ結果からアイテムの数を取得
私は理想的には、各月の数値をjavascriptボタンにマップしようとしています。 Month 1ボタンをクリックすると、javascriptテーブルに表示されるようにグループ化されたMonth 1エントリとそのエントリの数がすべて取得されます。その後、テーブルはエントリをループして画面に表示します。
私は数ヶ月のために、この文を使用して、エントリ
$myresult = customfunction($getCred, "Select * From Test_Data");
列の名前をつかんだが例えばNumericMonths、(整数) である私は、すべての「ヶ」グループにしたいと言うことができます この私は、コンテンツがWHにもよるが、私はループにしたいセットアップ
<div class="container">
<ul class="nav nav-pills">
<li class="active"><a data-toggle="pill" href="#Month1">Month 1(this is where the count of items should go)</a></li>
<li ><a data-toggle="pill" href="#Month2">Month 2(this is where the count of items should go)</a></li>
<li><a data-toggle="pill" href="#Month3">Month 3(this is where the count of items should go)</a></li>
<li><a data-toggle="pill" href="#Month4">Month 4(this is where the count of items should go)</a></li>
<li><a data-toggle="pill" href="#Month5">Month 5(this is where the count of items should go)</a></li>
<li><a data-toggle="pill" href="#Month6">Month 6(this is where the count of items should go)</a></li>
<li><a data-toggle="pill" href="#Month7">Month 7(this is where the count of items should go)</a></li>
を持っているJavaScriptのテーブルですICHボタンは、すなわちrows_per_monthは月の項目数が含まれ、これはあなたに2つの列を取得するループ
while ($row = custom_fetch_array($res)){
#My code here to generate a table such as $row["Name"] etc etc
};
[よくあるトピックについて](0120) (質問に答える) と[完璧な質問](http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) と[最小限の完全かつ検証可能な例](http://stackoverflow.com/help/mcve) ** SOは**無料のコーディングサービスではありません___あなたのコードを修正しようとしましたが、あなたのコードは書きません___ – RiggsFolly