Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Dynamic SQL

by mr_mischief (Monsignor)
on Apr 06, 2015 at 16:21 UTC ( [id://1122577]=note: print w/replies, xml ) Need Help??


in reply to Dynamic SQL

if ( $x > 10 ) { $query = '(select Name from Customers where CustId=?)' $cust_sth = $dbh->prepare( $query ); $cust_sth->execute( $custid ); } else { $query = '(select Name from Sales where SalesId=? and SalesTerrito +ry=?)' $sales_sth = $dbh->prepare( $query ); $sales_sth->execute( $salesid, $territory ); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1122577]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-25 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found