Mysql Date formats and url query

Posted by jasmine on Stack Overflow See other posts from Stack Overflow or by jasmine
Published on 2010-06-02T10:30:25Z Indexed on 2010/06/02 10:33 UTC
Read the original article Hit count: 249

Filed under:
|

I want to make a url query with date. I have confused a little :

There is a mysql table:

calDate : varchar

The query :

$sql="select * from calTbl";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {

    $n = str_replace("/", "",$row['calDate']);
    echo '<a href="index.php?p='.$n.'">'.$n.'</a>';
}

I want to see related event from query. Can I set apart month, day and year from this? Or what is the correct table design here? Thanks in advance

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql-query