30-40 queriesThis is probably what you were seeing:
code:
// loop through all the days of the month
while ( $d <= $lastday) {
...
select E_ID,E_Date,E_Time,E_Location,B_Subject, B_Number, B_Replies
FROM w3t_Events, w3t_Posts
WHERE E_Date >= '$lowdate'
AND E_Date < '$highdate'
AND B_Number = E_Number
AND B_Board = '$Board_q'
...
}
(This query originally was also selecting U_Username, but the username wasn't used anywhere, so I simply took it out, and there was no need to add a join to the users table.)
Maybe that's what dimopoulos was talking about in his
Fetching data in an array post.
I suppose the query could be done before the loop, extracting the data for the whole month, and storing it in an associative array. Do you think it would make sense to do that?