I need some help with date() to database

I’m trying to update a table with current date as follows!

/**

  • Update a record on another table
    */
    $var_date=date(“Y-m-d”);

// SQL statement parameters
$update_table = ‘baseplan’; // Table name
$update_where = “acount = ‘{acount }’”; // Where clause
$update_fields = array( // Field list, add as many as needed
“active = ‘YES’”,
“startday= $var_date”,
);

// Update record
$update_sql = ‘UPDATE ’ . $update_table
. ’ SET ’ . implode(’, ', $update_fields)
. ’ WHERE ’ . $update_where;
sc_exec_sql($update_sql)
;

But when trying with todays date 2016-12-14 this appears : 1292: Incorrect date value: ‘1990’ for column ‘startday’ at row 629
and i know that in math is 2016-12-14 = 1990 whats wrong with the script?
If i use varchar in database field, the update value will be 1990 today?

I solved it myself! i Put two ’ around $var_date like ‘$var_date’ SUCCESS!!!

If you are using Mysql you could simply use CURDATE as a variable. See: http://www.w3schools.com/sql/func_curdate.asp

That seems to be really easy