in reply to Re: Dynamic SQL
in thread Dynamic SQL
so when preparing and executing the query with the first query:if ($x>10) { $query="(select Name from Customers where CustId='$custid')" } else { $query="(select Name from Sales where SalesId='$salesid' and CustId='$custid')" }
with the second:$sth->execute(?)
so I can't have a single execute covering both occasions$sth->execute(?,?)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Dynamic SQL
by roboticus (Chancellor) on Apr 06, 2015 at 20:48 UTC | |
|
Re^3: Dynamic SQL (dynamic prepare)
by LanX (Saint) on Apr 06, 2015 at 15:46 UTC |