I am using PostgreSQL
Database. create a search query in using codeigniter like function.
$this->db->($colName."::text", $value)->get("datatables_demo");
SELECT * FROM "datatables_demo" WHERE "first_name::text" like '%co%'
But in PostgreSQL
shows error, I want output like that
SELECT * FROM "datatables_demo" WHERE first_name::text like '%co%'
Is there any option in codeigniter to remove inverted comma from like function ihave tried to send false in 3rd argument false
$this->db->($colName."::text", $value, false)
Give any option to resolve this issue using like function
Query:SELECT * FROM "datatables_demo" WHERE "salary::text" LIKE '%320%' ESCAPE '!'
When i run this query in postgresql
ERROR: column "salary::text" does not exist
LINE 1: SELECT * FROM "datatables_demo" WHERE "salary::text" LIKE ...
^
********** Error **********
ERROR: column "salary::text" does not exist
SQL state: 42703
Character: 40
But when i remove inverted comma from column it return result succuessfully
SELECT * FROM "datatables_demo" WHERE salary::text LIKE '%320%' ESCAPE '!'