I want to select data (from PostgreSQL) from an view like this:
$this->allSqlResult = $this->sqlEntity->fetchAll(
$this->sqlEntity->select()->where(
$this->sayCMSGridSession->{$this->sayCMSSession->pageName}->where
. ' = ? ',
'%' .
$this->sayCMSGridSession->{$this->sayCMSSession->pageName}->where_value
. '%'));
And the result is nothing. I watched the logs and I found this:
SELECT "saycms_modules_movieslibrary_view_movies".* FROM
"saycms_modules_movieslibrary_view_movies" WHERE (title= '%kutya%' )
and the result is really nothing because I want to see after the
"WHERE" an beautiful "title LIKE('%kutya%')".
So, my question is the next:
Can I select data through Zend_Db_Table_Abstract with LIKE? Did I
something wrong? Should I use Zend_Db_Select? What is yours
suggestions?
Appreciate your help!
Thank you!
András
--
- -
-- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando
-- "Bízzál Istenben és tartsd szárazon a puskaport!".-- Cromwell
没有评论:
发表评论