|
Posted by noone on 10/26/62 11:42
comp.lang.php wrote:
> if ($willLimitByDB) $sql = preg_replace('/#([^#]+)#/i', '$$1',
> $sql);
> This does not give me the results I want, instead of the value of
> $where in $sql, I literally get '$where' instead.
> How do I substitute #where# with $where?
> Thanx
> Phil
given: $sql="select * from table";
and $where="where a = 'a'";
$sql .= $where;
//concatenate it before you edit it...
if ($willLimitByDB) $sql = preg_replace('/#([^#]+)#/i', '$$1', $sql);
Navigation:
[Reply to this message]
|