Q&A > database programming
Description:
I'm using placeholders (in DBI/MySQL) on a set of INSERT statements;however, when I try to fill a "?" placeholder with the value of NOW(), I just get the plain string "NOW()" in my data. Is there any way to tell the DBI/MySQL that the NOW() is supposed to be a current time function and not a plain string?
Answer: Placeholders and NOW() contributed by runrig yes: But I suspect NOW() is a function in your particular database, in which case you wouldn't use a placeholder, and you would just put a literal NOW() in your SQL statement. Example:
|
Please (register and) log in if you wish to add an answer
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |