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(?,?)
In reply to Re^2: Dynamic SQL
by Anonymous Monk
in thread Dynamic SQL
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |