Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Modifying data.

Quote Reply
Modifying data.
I have enough command on DBSql now to run select, delete, insert commands within my Template Globals by creating subs e.g

------------------------------ FOR SELECT ---------------------------
my $sth = $DB->table('main')->select({'USERID' => $userid, 'STATUS' => $status, 'JOB' => $job})->fetchrow_array;
------------------------------ FOR INSERT ---------------------------
my $sth = $DB->table('main')->insert({ ID => "", MAIN_ID => $id, CLIENT => $client, TEMPLATE => $template, USERID => $userid });

The above two are just example, Now I am at a loss as what should be the UPDATE statement handle or how should it look like when I will be using it with Template Globals to call it within templates as <%mymodify($ID)%>

Can someone give me any idea as how to UPDATE a field using Template Globals subs?
Subject Author Views Date
Thread Modifying data. samsara 2326 Apr 17, 2005, 9:56 AM
Post Re: [samsara] Modifying data.
604 2214 Apr 18, 2005, 10:12 AM