What's wrong with this code?
| From: | Timothy Wright | Date: | Fri, 16 Feb 2001 15:00:42 +0000 |
| Subject: | What's wrong with this code? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-6686@lists.php.net to get a copy of this message | ||
Hello -
I'm not getting any errors on this... and the variable is passing from the
form on the other page, but I'm getting empty result sets when I know there
should be data.
<?
$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>
Thanks in advance for any help!
Tim Wright
:::::::::::::::::::::::::::::::::::::::::::
::: :::
::: Timothy Wright :::
::: mailto:tim.wright@01network.com :::
::: Digital Network Enterprises :::
::: http://www.01network.com :::
::: :::
::: secure e-mail by request :::
::: (PGP signature and/or encryption) :::
:::::::::::::::::::::::::::::::::::::::::::