My code for DB looks so:
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from('zgclh_k2_categories');
$query->where("`name` LIKE '%MY_SEARCH_WORD%'");
$db->setQuery($query);
$results = $db->loadObjectList();
foreach($results as $entry) :
echo $results->name . "<br />";
endforeach;
If i run my query in a DB editor, with my searchword i get 3 results and that's ok. but here is something wrong in my foreach, because i have tested where is the error, can someone give me any ideas to solve this problem?
It should be $entry->name
Dmitry