Help with calculating purchases per day

Thanks for your replies.

Regarding, if the ‘earned_amount’ db column populates a decimal place, for example 1.5, instead of just 1, but it won’t display 1.5 on the html page, (and I showed the html code above), that html code gets it’s info from this php code:

$this_day_video_earn = $db->rawQuery("SELECT SUM(earned_amount) AS sum FROM ".T_U_PAID_VIDEOS." c WHERE `time` >= ".$day_start." AND `time` <= ".$day_end." AND user_id_uploaded = ".$pt->user->id);

$today_earn = $this_day_video_earn[0]->sum ;

I’m looking for clues/ideas on what I might modify to get the html to display with a decimal place.

Any additional comments/suggestions are welcomed.