Fellow PHPbuilders,
I am a novice to PHP. I am having press releases dynamically written to a MySQL database. The title of each press release is under the row "header", the body is under row "body". I am trying to get PHP to retrieve only (and all of) those press releases that are <24hrs old and put the "header" for each on the mainpage with an active link to a following page which contains the "body". Each press release has a given id and a given time of entry. TIme of entry is in standard MySQL format (00:00:00).
This little piece of code is all I have, but it is not complete and I'm not sure exactly how to finish it off
<?
$conn = mysql_connect('localhost', user, pass);
mysql_select_db("database");
$query = "select body from press_releases where id='$id'";
echo $QUERY_STRING."<BR>";
?>
Can anyone help?
thanks,
cdherold
I am a novice to PHP. I am having press releases dynamically written to a MySQL database. The title of each press release is under the row "header", the body is under row "body". I am trying to get PHP to retrieve only (and all of) those press releases that are <24hrs old and put the "header" for each on the mainpage with an active link to a following page which contains the "body". Each press release has a given id and a given time of entry. TIme of entry is in standard MySQL format (00:00:00).
This little piece of code is all I have, but it is not complete and I'm not sure exactly how to finish it off
<?
$conn = mysql_connect('localhost', user, pass);
mysql_select_db("database");
$query = "select body from press_releases where id='$id'";
echo $QUERY_STRING."<BR>";
?>
Can anyone help?
thanks,
cdherold