Gossamer Forum
Home : Products : Gossamer Links : Discussions :

GT::SQL UPDATE Question

Quote Reply
GT::SQL UPDATE Question
I am looking for the syntax for manipulating a table's column with a function in an update statement:

Code:


$affected = $lt->update({ Title => 'myfunc(Title)'});


sets all rows to: "myfunc(Title)"

Code:


$affected = $lt->update({ Title => myfunc('Title')});




sets all rows to: "Title"

Code:
$affected = $lt->update({ Title => \'myfunc(Title)'});




Does not do anything... it does not seem to run myfunc, leaving the Title values to be unchanged.


myfunc should be manipulating Title and return a similar string back.

I am assuming the last code example is the one which really should work, as the \ should force the sql parser to not quote the function.


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jul 9, 2002, 8:48 PM
Subject Author Views Date
Thread GT::SQL UPDATE Question Ian 1225 Jul 9, 2002, 8:34 PM
Post Re: [Ian] GT::SQL UPDATE Question
Ian 1153 Jul 10, 2002, 3:24 PM