Date format in Mysql
Posted: Fri Mar 12, 2010 10:37 am
Hi
This problem drives me crazy. I try to update a field type date but i can't and i don't know why. Here is my code:
How can i get the date format in my server (d-m-y or y-m-d or ...)?
Thank you
This problem drives me crazy. I try to update a field type date but i can't and i don't know why. Here is my code:
Code: Select all
<?php
$mysql_id = mysql_connect('localhost', 'xxx', 'xxx');
mysql_select_db('mariolopes',$mysql_id);
$query="update negocios set Data_venda='$_POST[hoje]' where Codigo='$_POST[codigo]'";
$result=mysql_query($query);
if(!$result){
echo(mysql_error());
}
else{
header("location:darcomopago.php");
}
?>
Thank you