|
|
// includes
include("conf.php");
include("functions.php");
?>
// open database connection
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
// select database
mysql_select_db($db) or die ("Unable to select database!");
// generate and execute query
$query = "SELECT * FROM titel ORDER BY id DESC";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
// if records present
if (mysql_num_rows($result) > 0)
{
// iterate through resultset
// print title with links to edit and delete scripts
while($row = mysql_fetch_object($result))
{
?>
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
echo nl2br($row->content); ?>
} } else { ?>
DATENBANK ERROR! TILT!
} mysql_close($connection); ?>
 |
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
mysql_select_db($db) or die ("Unable to select database!");
$query = "SELECT * FROM oneinfo ORDER BY timestamp DESC LIMIT 0, 1";
$result = mysql_query($query) or die ("Error in: $query. " . mysql_error());
if (mysql_num_rows($result) > 0)
{
while($row = mysql_fetch_object($result))
{
?>
echo $row->titel; ?>
echo formatDate($row->timestamp); ?> |
}
}
else
{
?>
No news
}
mysql_close($connection);
?>
|
|
 |
 |
 |
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
|
|
| |
Page
Content by P.O.R.N REC. - DESIGN © 02-05 eat pixel inc.  |
|
|