By marcuscavalcanti on
I'm using the function db_query() in this code:
[pre]
db_query('INSERT INTO {node_log} (nid, date_log, time_log) VALUES (%d, %s, %s)', arg(1), date("Y-m-d"), date("H:i:s"));
[/pre]
But is not parsing correctly, when i print the code, i have this:
INSERT INTO node_log (nid, date_log, time_log) VALUES (1062, 2007-05-28, 0)
The strings are not parsed!
Anyone knows the motiv?
Comments
You still need quotes for strings
So
would be
Does this help? (I am not sure what parsing of the string you would expect)
Thanks :) I think that the
Thanks :)
I think that the %s automatically escape the strings.