phph/mysql select frrom a unix date??

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

stomic_50

Thread Starter
Joined
Dec 7, 2004
Messages
15
i'm making a news script... stuck at news archiving!
my Q is how to make a link which will on the next page select all stories that are posted in january this year for example. i use unix time in the table.

this is the code that i've got:

<?php print "<a href=\"months.php?p=1104537600&k=1107215999 \">january</a>";?>
on months.php i have the following code:

$result = mysql_query("SELECT * FROM stories where modified between $p and $k ");

this works but i don't like the idea of having to put unix times in links. there has to be a better way to do this.

how can i convert 31-Jan-2005 23:59:59 to unix time format?
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top