Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Use mysql NOW() fuction from DBIx::Class

by haoess (Curate)
on Jul 16, 2007 at 07:03 UTC ( #626789=note: print w/replies, xml ) Need Help??

in reply to Use mysql NOW() fuction from DBIx::Class

You can use NOW() in your UPDATE-clause:

my $item = ...; $item->update({ time_column => \'NOW()', # more columns here });

-- Frank

Replies are listed 'Best First'.
Re^2: Use mysql NOW() fuction from DBIx::Class
by Mutant (Priest) on Jul 16, 2007 at 11:29 UTC
    Yep, a scalar reference passes a literal string to the SQL, rather than a bind variable.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://626789]
LanX Gesundheit! :)
talexb wonders about dividing developers in those born before the Unix timestamp of zero .. and after. Spoiler: I'm before.
chacham remebers I am a mad scientist
[stevieb]: talexb I'm after by a few years, but we can still be friends because you live in my hometown ;)
[LanX]: White House
[LanX]: next inauguration ?

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-08-18 13:29 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (303 votes). Check out past polls.