I am busy with a project for fun and I am finding it tricky to set balues for mysql queries.
If I do the following:
function CalcPostByTime(){
include 'DB_connection.php';
$result = mysql_query("SELECT ztime FROM blogpost;");
What is the simplest way to set an array, which will be a return value of the function, for the ztime value. Basically it is a unix time value, and in this query it is the only thing that I want to get out.
I want to then iterate through it in date/time order and set a value numbers as keys to the array in another function. Or should I do that in the query itself? Basically I don't want to worry about keys in the database, so that I always have the option of deleting or changing. I what to iterate through the values each time to order the posts, and set my selecting from there.