Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-19-2006, 07:14 PM   #1
BlazingBucks_Ryan
Confirmed User
 
Join Date: Dec 2005
Posts: 203
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>";
}
?>
__________________
BLAZING BUCKS - Leading The Fight Against Saturation!
1000's Of Pics For Your TGP Submissions, Pre-Built Free Sites, and Dynamically
Changing Tours Assuring Your Traffic Is ALWAYS Converting The Best It Possibly Can!

ICQ : 253483920 or [email protected]
BlazingBucks_Ryan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-19-2006, 07:19 PM   #2
Varius
Confirmed User
 
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
In your query you can use the mysql function FROM_UNIXTIME() around the field in question...or on the PHP side, you can use the date() function on it to format it as you like
__________________
Skype variuscr - Email varius AT gmail
Varius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-19-2006, 07:21 PM   #3
BlazingBucks_Ryan
Confirmed User
 
Join Date: Dec 2005
Posts: 203
Awesome Thanks Varius !!
__________________
BLAZING BUCKS - Leading The Fight Against Saturation!
1000's Of Pics For Your TGP Submissions, Pre-Built Free Sites, and Dynamically
Changing Tours Assuring Your Traffic Is ALWAYS Converting The Best It Possibly Can!

ICQ : 253483920 or [email protected]
BlazingBucks_Ryan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-19-2006, 07:43 PM   #4
BlazingBucks_Ryan
Confirmed User
 
Join Date: Dec 2005
Posts: 203
Worked perfectly, tried to use the mysql function but I didn't like the output .. quick google showed me how to do the formatting and boom! ;)

Thanks Again Bro !
__________________
BLAZING BUCKS - Leading The Fight Against Saturation!
1000's Of Pics For Your TGP Submissions, Pre-Built Free Sites, and Dynamically
Changing Tours Assuring Your Traffic Is ALWAYS Converting The Best It Possibly Can!

ICQ : 253483920 or [email protected]
BlazingBucks_Ryan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.