| BlazingBucks_Ryan |
01-19-2006 07:14 PM |
Know anything about MySQL Queries through PHP ?
Ask me to do an install no problem... but I know absolutely NOTHING about programming, the last two days I have spent more time tweaking crap than I care to admit.. I think I am FINALLY starting to get the hand of basic database integration into websites through SQL Queries .. Anyways the code is below, my problem is it is displaying the date in this format 1137679440, 1137678780, 1137678240, and so on ..
I could change the way it appears in the mysql tables but then I risk it affecting the way the rest of the script displays the date. I assume there is some way to convert the date through php code into standard XX/XX/XXXX format.. Time and date would be nice if I could get it from that also.. Any ideas? Code is below,
Code:
<?
$query = "SELECT bhost_entries.e_id,bhost_entries.title,bhost_entries.date,bhost_weblogs.owner,bhost_weblogs.weblog FROM bhost_entries,bhost_weblogs WHERE bhost_entries.author_u_id = bhost_weblogs.u_id ORDER BY bhost_entries.e_id DESC LIMIT 12";
$result = mysql_query($query);
echo mysql_error();
while(list($id,$title,$date,$owner,$weblog) = mysql_fetch_array($result))
{
echo "<TR><TD WIDTH=100><a href='http://$weblog.domainname.com/profiles/directory/' target='new'>$owner:</a></TD><TD WIDTH=400><a href='http://$weblog.domainname.com/' target='new'>$title</a> $date</TD></TR>";
}
?>
|