문제

Hi i'm using zendx_jquery_form_autocomplete. I have a mysql database with a table user. User has a ID and a Name. My problem is that i don't know I can do my research in the Name column and have the id of the right row. In the tutorial that i saw there is a research in a array and that work fine but now i shoul pass the id of my research...

도움이 되었습니까?

해결책

Use mysql like operator for your search in rows.

$param =  $this->_getParam('param'); //send from autocomplete

$result = Zend_Db_Table::getDefaultAdapter()->select()->from('users','user_id')->where('name like =?',"%$param")->query()->fetchAll();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top