Where like sql statement error

argian
Member | 13
+
0
-

Hi,

I am trying to make a search in database with this code:
$this->template->museums = $this->database
->table(‘museum’)
->order(‘mu_id DESC’)
->limit(100)
->where( ‘museum.name like ?’, $search);

But it generates an error:

SELECT *
FROM museum
WHERE (museum.name like = ‘αρ’)
ORDER BY mu_id DESC
LIMIT 100

What I am doing wrong?

Kamil Valenta
Member | 610
+
+2
-

LIKE is a key-word:

->where( ‘museum.name LIKE ?’, $search);
argian
Member | 13
+
0
-

Yes.

You are right.

I had a read the manual more carefully.

Thank you.