Reputation: 2380
I am trying to get the name which startet with this substring ZOB
. In my table I have stop name ZOB/Hauptbahnhof Bussteig 5
and I want to get it as result back.
With the query below the result is empty.
query:
Select stop_name from behaviour where stop_name like 'ABC' and mac = ? LIMIT 1
Upvotes: 1
Views: 39
Reputation: 312259
You are missing a wildcard (%
) in the like
's argument:
SELECT stop_name
FROM behaviour
WHERE stop_name like 'ZOB%' AND mac = ?
LIMIT 1
Upvotes: 4