if ($x>10) { $query="(select Name from Customers where CustId='$custid')" } else { $query="(select Name from Sales where SalesId='$salesid')" }
what I am worried about is 1.SQL injection, since I can't use placeholders and 2.performance, since the query won't be cached
What should I do about both of those points?In reply to Dynamic SQL by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |