how to insert mysql function into query in java
Hello,
i've got a problem here :
i try to use mysql function NOW() for example:
sql query is
INSERT INTO users (NAME,TIME) values("John", NOW() )
In java i use bean to connect to DB
String query="INSERT INTO users (NAME,TIME) values('john','now()')";
dbaccess.statement.executeUpdate(query);
but it doesn't work, it is because there is function NOW() with special characters () how can i solve this problem ?
i tried to use
String query="INSERT INTO users (NAME,TIME) values('john','now/(/)')";
String query="INSERT INTO users (NAME,TIME) values('john','now\(\)')";
but nothing works,
Thanks in advance

