This query works as it should (outside Go)
SELECT job_id,job_subjectFROM job
WHERE lower(concat(job_id,job_subject)) like lower('%WEB%')
I am trying to replace “WEB” with a placeholder in this query.
SELECT job_id,concat(co_name1||co_name2) as co_name,job_subject FROM job
WHERE lower(concat(job_id,job_subject)) like lower('%$?%')
In Go I use this:
rows, err := db.Queryx(query, val)
But I get this error:
pq: got 1 parameters but the statement requires 0
What am I doing wrong?