mercredi 4 octobre 2017

Creating html table by means of a single query in php

I have two tables Week and user, in the week table I have ID week|day|month|year and in the user table I have ID user|nameusuario|IDUweek|IP|value

The query I do with mssql_array_assoc, where you bring me the following query

$query = array( "nameusuario" => "Pedro", "IDsemana" => 1, "dia" => 25, "mes" => 9, "axo" => 2017, "cara"=>4); 

in succession, any values ​​you have saved

that's how I print the query enter image description here

what I want is for the table to be printed like this

desired tableenter image description here

where the year is printed first, then the months, then the user with the weeks and finally the value inside the weeks, and get an average of all that




Aucun commentaire:

Enregistrer un commentaire