Re: [PBML] MySQL - trying to insert date only.
- Use curdate() instead of now()
>my $sql = qq~ INSERT INTO $table(id, job, name, type, chars, trans,
>tim) VALUES ('', "$job", "$name", "$type", "$chars", "$trans", now())
>Only now() function is working for me in the script, this inserts
>the time as well with date. I need Date only, so I found a way
>around it to define 'tim' as SMALLINT(10) so it only gets YYYY-MM-
>DD, dirty trick.
>But anyone can tell me what should I use to insert DATE only? what
>should I replace now() with? as I want to define the column 'tim' as
>DATE rather SMALLINT(10).
>Thanks for any help.