On Sat, Feb 11, 2012 at 3:19 PM, Miguel Barco <[email protected]> wrote:
>
> Hi, I previously asked how to useĀ ON DUPLICATE KEY UPDATE in dbix, but I got 
> no answers and I can't find nothing about it in the docs.


I know very little about this (non-standard?) MySQL syntax, but a
quick Google leads me to believe that you could just use
update_or_create():

http://desert-island.me.uk/perldoc/dbix-class-branch/lib/DBIx/Class/Manual/SQLHackers/UPDATE.pod

| DBIx::Class does not produce the non-standard MySQL "ON DUPLICATE KEY UPDATE",
| instead it has a shortcut for combining *find* and *update*.

Maybe this is worth investigating,

Chisel

--
Chisel
e: [email protected]
w: http://chizography.net

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to