To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
Its not quite right. The image field is called "promoimage" which is part of every record in the table of events. This is a URL. My code is as follows:
The expected output is for each day to show its image URL - logo. The first 14 show, but they are shifted to the right (wrong order). Then last 7 should show, but they do not.
One problem I see is that you've forgotten that result row numbers start from 0, while $i starts from 1.
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
$i starts from 1 because if it were to start from 0 the first date of the month would be the 0st, which doesnt exist lol. I am so confused! PHP is not my expertise, any other ideas mate?
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
I'm trying to figure out how you have your database set up. From what it looks like, unless your database has an entry for EVERY day, then it's not going to work.
Have you tried looking the results from the query? What is the result if you do this:
PHP Code:
$query= 'SELECT * FROM calendar_event ORDER BY day';
$result=mysql_query($query);
print "<pre>";
print_r($result);
print "</pre>";
I'm thinking that the result of the query isn't what you're expecting.