High decomposition puzzle: PHP query MySQL data, recordset how special display!
MYSQL has a commodity price table,
Query a product in PHP, displayed on the page, the query results are as follows:
The difficulty is how to display by year and month! The hard-to-die brother, Kneel beg operation statement!
------Solution--------------------
PHP Code
.... $result =mysql_query ("Select year (addtime) as Y,group_concat (jiage) as STR from the TABLE_NAME GROUP by Year" ( Addtime); "); while ($row =mysql_fetch_assoc ($result)) { echo '; echo "$row [y]"; foreach (Explode (', ', $row [str]) as $v) echo "$V; Echo ';} ............
------Solution--------------------
$result =mysql_query ("Select year (add_date) as Y,group_concat (yc_jiage) as Str from Jiagedata Group by year (Add_date);") O R Die (Mysql_error ());
Post a hint.
------Solution--------------------
What information is prompted after executing the #12 building.