Jump to content

php and mysql -> december 31st, 1969


xionhack

Recommended Posts

have you pulled the required info needed? like all the rows? with post_time and such..

 

as im trying to publish what im about to show you to my website, but my server's ftp is updating lol

so i cant test it and tweak it lol

 

well my code is:

 

<?php
include("connect.php");
$getnews = mysql_query("SELECT * FROM phpbb_posts WHERE forum_id='4' ORDER BY post_time DESC");
$checknews = mysql_num_rows($getnews);

if($checknews==0)
{
echo 'No news as of yet!';
}
else
{
while($row = mysql_fetch_assoc($getnews))
{
	$date = date('g:ia - D jS M', strtotime($row['post_time']));
	echo '<tr><td>'.$row['post_subject'].'</td><td>'.$date.'</td></tr><br>
	<tr><td>'.nl2br($row['post_text']).'</td></tr>';
}
}
?>

 

please beware that this is obviously used for myself to my spec, hope it can help in anyway maybe...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.