i have this php algorithm ranking function(hacker news),
function calculate_score($votes, $item_hour_age, $gravity=1.8){
return ($votes - 1) / pow(($item_hour_age+2), $gravity);
}
and i have this table in mysql:
post{id, post_text, votes, date}:
i was wondering how i can pass these mysql data paramters to that function, to determine the order they go in, PS. $item_hour_age, is how many hours the post is been posted