You are here: Re: Need to substitute #where# with $where « PHP Programming Language « IT news, forums, messages
Re: Need to substitute #where# with $where

Posted by noone on 11/18/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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация