[PHP] Which is more efficient?

Associate
Joined
10 Jul 2006
Posts
2,423
Hi there,

Basically I am creating a project that creates a monthly view of things that are happening on specific days.

I am going to store all the information that is to be filled in the calendar in a database and I was wondering what the most efficient and quickest way to get the data would be.

What I am thinking is there is two options.

I can either query the database as I create each cell of the table for each day, or I can query for the month and sort it out using code manually, via If statements and what not.

Obviously the first one will be the easiest, but I am wondering it would be better to do the second one?

Thanks.
 
Back
Top Bottom