Construct Oracle Like query using PHP Zend Framework bindParam

上一篇 / 下一篇  2008-06-24 23:03:12 / 个人分类:PHP

When first time I approached to the Zend Framework using the bindParam, I thought it is very tedious, but as I use it more, it became my second nature and I actually I like it.

To construct the Oracle Like query as following
select first_name,email from accounts where email like '%:bindString'
using the bindParam, we need to re-construct the sql string as
$sql = "select first_name,email from accounts where email like '%' || :bindString"

the trick is to use the concatenate ' || ' to concatenate the '%' in the string.


TAG: Framework Oracle ORACLE using Zend bindParam

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

数据统计

  • 访问量: 6408
  • 日志数: 11
  • 建立时间: 2008-06-10
  • 更新时间: 2008-07-19

RSS订阅

Open Toolbar