Herkese merhabalar
Elimdeki veritabanında Zend Framework ile arama yapmak istiyorum. Arama
sayfasında kullanıcı tablo üzerinde hangi alanda arama yapmak istediğini
seçtikten(select box) sonra arama kriterini giriyor(input type text).
Daha Zend Framework üzerinde aşağıdaki kod ile arama yaptırıyorum ancak
malesef MySql Syntax hatası alıyorum. Tavsiyelerinizi verirseniz sevinirim.
public function searchAction()
{
$this->view->title = 'Search Results';
$this->view->headTitle($this->view->title,'PREPEND');
if($this->_request->isPost())
{
$filter = new Zend_Filter_StripTags();
$choice = $this->_request->getPost('choice');
$material=
$filter->filter($this->_request->getPost('material'));
$searchDatabase = new Model_DbTable_MMT();
.........
.........
$where = $choice . "= " . $material;
}
else {
$this->_redirect('/');
}
}
Aldığım hata. Where işlemini bir türlü yemedi...
*Message:* SQLSTATE[42000]: Syntax error or access violation: 1064 You have
an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near ')' at line 1
>fetchAll('MMT_Number= ')
Erdal YAZICIOGLU
System & Network Engineer
Page Europa S.R.L - General Dynamics
www.pageuropa.it
Office - Rome : +39 0650395292
Mobile -Rome : +39 3490787196
Mobile -Istanbul: +90 536 3447989
_______________________________________________
Linux-programlama mailing list
[email protected]
http://liste.linux.org.tr/mailman/listinfo/linux-programlama