1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

phph/mysql select frrom a unix date??

Discussion in 'Web Design & Development' started by stomic_50, Jan 31, 2005.

Thread Status:
Not open for further replies.
  1. stomic_50

    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?
     
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 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/325420

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice