Mysql Date formats and url query
- by jasmine
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