I have a question regarding PHP and mySQL date fields. Currently I performing the following query:
$query="select Actions.Action_ID, Actions.Action_Title, Actions.Action_Status, date_format(Actions.Action_Submit_Date, '%m %d %y') as date from Contacts, Institutions, Actions where Contacts.Inst_ID = Institutions.Inst_ID and Institutions.Inst_ID = Actions.Inst_ID and Contacts.Contact_ID = '".$ContactID."' order by Actions.Action_Status desc, Actions.Action_Title asc";
To get the date placed into an HTML table I am using the following:
$ActionRow=mysql_fetch_array($result);
echo ("<td>".$ActionRow["Action_Submit_Date"]."</td>");
Theoretically the date_format(Actions.Action_Submit_Date, '%m-%d-%y') as date should do the job. However, I get no output. I have tried a variety of variations on this and am still not able to get it to work. The field in mySQL is a DATE field.
If someone can help me out I'll buy you a corvette.
Thanks,
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
$query="select Actions.Action_ID, Actions.Action_Title, Actions.Action_Status, date_format(Actions.Action_Submit_Date, '%m %d %y') as date from Contacts, Institutions, Actions where Contacts.Inst_ID = Institutions.Inst_ID and Institutions.Inst_ID = Actions.Inst_ID and Contacts.Contact_ID = '".$ContactID."' order by Actions.Action_Status desc, Actions.Action_Title asc";
To get the date placed into an HTML table I am using the following:
$ActionRow=mysql_fetch_array($result);
echo ("<td>".$ActionRow["Action_Submit_Date"]."</td>");
Theoretically the date_format(Actions.Action_Submit_Date, '%m-%d-%y') as date should do the job. However, I get no output. I have tried a variety of variations on this and am still not able to get it to work. The field in mySQL is a DATE field.
If someone can help me out I'll buy you a corvette.
Thanks,
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->