Jump to content

Ajuda em PHP


Recommended Posts

Boas, eu quero criar um gráfico em PHPLOT em que agrupe os meses e anos e apresente o numero de utilizadores pelo id registados nesse periodo. O problema esta na sql

$query = "SELECT id, registado FROM utilizadores GROUP BY Year(registado) and month(registado)";

$result = mysql_query($query) or die(mysql_error());

// Print out result

while($row = mysql_fetch_array($result)){

echo $row['id']. " - $". $row['registado'];

echo "<br />";


registado 1 2014-05-04 10:41:53

Porque não está a dar?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.