
August 21st, 1999, 02:34 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
I need help, I am trying to pass a date value like "1999-08-21" into mySQL database, it is not saving to the database.
Here is the code
<?
if( isset($category) && isset($product) && isset($saleprice) && isset($entrydate)){
mysql_connect)"localhost", "webuser", "");
$query = "INSERT INTO items VALUES('$category', '$product', '$saleprice', '$entrydate', NULL)";
$result = mysql_db_query("onsale", $query);
if ($result) {
echo "added";
}
}
?>
where onsale is the mySQL database, items is a table, and saleprice is decimal(6,2) and entrydate is date and last column is ID a primary key with auto_increment and an no null value.
|