
Originally Posted by
tpf80
What is the proper way to use bindvalue with a "like" query?
Try:
SELECT userid, username, firstname, lastname, email, STATUS
FROM user
WHERE username LIKE '%' || :something || '%'
select userid, username, firstname, lastname, email, status
from user
where username like '%' || :something || '%'
To copy to clipboard, switch view to plain text mode
or
query.bindValue(":something", "%" + somevariable + "%" );
query.bindValue(":something", "%" + somevariable + "%" );
To copy to clipboard, switch view to plain text mode
Bookmarks