Mahbs Mahbs - 3 months ago 21
SQL Question

Keyword Not Recognized error in PhpMyAdmin

I have a query that I've been trying to execute on

, the query is as follows:

UPDATE `energyconsumption` SET `Date`= CURRENT_DATE, WHERE USER = '17';

This is response that I get back:

2 errors were found during analysis.

Unrecognized keyword. (near "CURRENT_DATE" at position 39)

Unexpected token. (near "," at position 51)

How do I resolve this error? And how do I use
in the correct way?


I've searched online about the correct way of using the function
, but I haven't had much luck on find a good site that explains it. Also, w3schools website has been down since yesterday so I haven't had the chance to look there on the correct syntax for using this function.

Thank you in advance!


use now() instead of CURRENT_DATE and remove the ,