Note that there are some explanatory texts on larger screens.

plurals
  1. POzend framework 1.11.5 is choking on search function - mysql db
    primarykey
    data
    text
    <p>ZF 1.11.5 is puking all over this search function. i've tried creating the query several different ways, sent the sql statement to my view, copied and pasted the sql statement into phpMyAdmin and successfully retrieved records using the sql that ZF is choking on. i have been getting a coupld of different errors: 1) an odd SQL error about 'ordinality' (from my Googling ... it seems this is a ZF hang up .. maybe?) and 2) Fatal error: Call to undefined method Application_Model_DbTable_Blah::query() in /blah/blah/blah.php on line blah</p> <pre><code>public function searchAction($page=1) { $searchForm = new Application_Model_FormIndexSearch(); $this-&gt;view-&gt;searchForm = $searchForm; $this-&gt;view-&gt;postValid = '&lt;p&gt;Enter keywords to search the course listings&lt;/p&gt;'; $searchTerm = trim( $this-&gt;_request-&gt;getPost('keywords') ); $searchDb = new Application_Model_DbTable_Ceres(); $selectSql = "SELECT * FROM listings WHERE `s_coursedesc` LIKE '%".$searchTerm."%' || `s_title` LIKE '%".$searchTerm."%'"; $selectQuery = $searchDb-&gt;query($selectSql); $searchResults = $selectQuery-&gt;fetchAll(); } </code></pre> <p>here's my model ....</p> <pre><code>class Application_Model_DbTable_Ceres extends Zend_Db_Table_Abstract { protected $_name = 'listings'; function getCourse( $courseId ) { $courseid = (int)$courseId; $row = $this-&gt;fetchRow('id=?',$courseId); if (!$row) throw new Exception('That course id was not found'); return $row-&gt;toArray(); } } </code></pre> <p>never mind the view file ... that never throws an error. on a side note: i'm seriously considering kicking ZF to the curb and using CodeIgniter instead. </p> <p>looking forward to reading your thoughts. thanks ( in advance ) for your responses</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload