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?
------------------------------ 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?