Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: Perl and MySQL update question

by polettix (Vicar)
on Nov 19, 2007 at 08:53 UTC ( [id://651617]=note: print w/replies, xml ) Need Help??

in reply to Re: Perl and MySQL update question
in thread Perl and MySQL update question

MySQL is implied by the title. Moreover, you're assuming that the date field is a textual one, which could not be the case, and the OP is asking for an int field. andreas1234567's approach seems more robust.

perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Io ho capito... ma tu che hai detto?

Replies are listed 'Best First'.
Re^3: Perl and MySQL update question
by sids (Acolyte) on Nov 19, 2007 at 14:06 UTC
    Missed the (obvious) MySQL reference in the title, sorry.
    The data in the date field is in the format dd:mm:yyyy, which indicates that it is _not_ a datetime field (so it must be a text field). In this case andreas1234567's approach would not work.

    Ignorance killed the cat, curiosity was framed.
      I was referring to the fact that the target was asked to be of integer type, but I see your point about the source. Probably a merge between your solution and andreas1234567's would do.

      perl -ple'$_=reverse' <<<ti.xittelop@oivalf

      Io ho capito... ma tu che hai detto?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://651617]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-06-15 20:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.