in reply to Re^2: can't use global @_in "my"
in thread can't use global @_in "my"
That's strange. under normal circumstances placeholders are much more efficient, especially if you reuse the statement handle returned by $dbh->prepare() and run the query many times. Do you have any links to this problem?
In case you need to use $dbh->quote() it's possible to use Interpolation to make the syntax nicer:
use Interpolation "'" => sub {"'".$dbh->quote($_[0])}; #... $sql = qq{ declare \@usrid int, \@sysusrid int select \@sysusrid = suser_id($'{$usrname}') select \@usrid = $IDVALUE from $ID where $IDNAME = 'USR_ID' insert into APPUSR (APP_CD, USR_ID, USRNAME, USRFNAME, USRLNAME, FNCGRP_CD, SYSUSR_ID) values ('A', \@usrid, $'{$usrname}', $'{$first}', $'{$full_last}', $fncgrp, \@sysusrid) };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: can't use global @_in "my"
by diotalevi (Canon) on Aug 01, 2007 at 14:10 UTC | |
by mpeppler (Vicar) on Aug 02, 2007 at 18:39 UTC |