Jump to content

Problem counting average row for each day


badeand

Recommended Posts

Hi,

 

I'm trying to get out the average of records stored in a mysql table

 

This is the code im using right now

mysql_query("SELECT DATE(dato) , COUNT( dato ) AS counted FROM dekodere GROUP BY date(dato)", $link);
										 $ave = mysql_num_rows($ave);

 

This is getting out the average, but i need to exclude weekends because there is not stored anything during the weekend so it's making the average go off..

 

any tips?

 

List more information about the tables your using.. This line of code doesnt tell me a lot of whats going on.

 

In norwegian: Legg ut informasjon om hvordan sql tabellene ser ut. Vanskelig å skjønne noe ut i fra hva du nevnte. Hvis du ikke finner svar kan du sende meg en PM så skal jeg gjøre mitt beste.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.