0

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...

Simone
  • 85
  • 1
  • 9

1 Answers1

0

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();
Mr Coder
  • 8,169
  • 5
  • 45
  • 74