Hallo 
Ik ben nu weer bezig aan mijn agenda-script, wat ook in mijn carnavalsvereniging-site komt.
Nu is mijn tabel zo opgebouwd, en ik wil alle activiteiten van de maand laten zien waar op geselecteerd wordt.
Met de volgende code krijg ik hetvolgende te zien:
Ik moet selecteren op 2009-5.
Er zijn deze maand geen activiteiten!
Hoe kan ik dit zo maken dat ik wel alle activiteiten van die maand te zien krijg?
Ik hoop dat iemand me hiermee kan helpen
.
Kjeld

Ik ben nu weer bezig aan mijn agenda-script, wat ook in mijn carnavalsvereniging-site komt.
Nu is mijn tabel zo opgebouwd, en ik wil alle activiteiten van de maand laten zien waar op geselecteerd wordt.
+--------------------------------------------------------------------+
| id | datum | activiteit |
+-------+----------------------------------+------------------------+
| 1 | 2009-05-21 00:00:00 | Testactiviteit |
| 2 | 2009-05-14 00:00:00 | Testactiviteit1 |
| 3 | 2009-04-21 00:00:00 | Testactiviteit2 |
+---------------------------------------------------------------------+ Met de volgende code krijg ik hetvolgende te zien:
Ik moet selecteren op 2009-5.
Er zijn deze maand geen activiteiten!
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Ik moet selecteren op "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$getjaar[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"-"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$getmaand[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"."[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$vandaag[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Y-m-d[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT *, UNIX_TIMESTAMP(datum) AS t_datum FROM agenda WHERE datum = NOW()"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<br /><div class=melding>Er zijn deze maand geen activiteiten!</div>"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]))
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000] | [/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]activiteit[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<br />"[/COLOR][COLOR= #007700];
}
}[/COLOR]
?> Hoe kan ik dit zo maken dat ik wel alle activiteiten van die maand te zien krijg?
Ik hoop dat iemand me hiermee kan helpen
.Kjeld


Maar is iig gefixed nu