> <?
> $link = mysql_connect ("localhost", "www", "scripts4") or die ("Could not
> connect");
> $db = mysql_select_db ("schileens_db") or die ("Could not select
> database");
> ?>
> <TITLE>Weekday events</TITLE>
> </HEAD>
> <BODY>
> <?
> # make function #
> function display_events ()
> {
> # declare global variable coming from other page #
> global $PHP_SELF;
> # select events for this day #
> $query="select msg_year, msg_month, msg_day, msg_title from
> calendar_messages where CONCAT(msg_year,msg_month,msg_day) = $yyyymmdd" ;
> $result=mysql_query ($query) or die ("cannot execute query");
>
> while ($row = mysql_fetch_array ($result))
> {
> printf ("%s %s %s %s<BR>\n", $row["msg_year"],
> $row["msg_month"],
> $row["msg_day"], $row["msg_title"]);
> }
> mysql_free_result ($result); } ;
> ?><A href="drop5.php">back to weekday selection
> </A>
>
where is the variable $yyyymmdd coming from?? This should be global if you
want to use it in the function
Also why have the columns for the date when you could use DATE??
Regards
M@
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]