Hi!
I have a table that is used to store user_posts. It has a text field called content (TEXT). Users can post #hashtags #our #cool.
I'm trying to run a database search using active record to find the specific hashtags.
When I run:
It doesn't correctly return all posts with the #cool, but instead all posts containing a #. I ran the query in PhpMyAdmin and it worked perfectly fine.
When I run $this->db->last_query(); it outputs pretty much the same SQL:
Does anyone have any experience with what could be causing this issue?
I have a table that is used to store user_posts. It has a text field called content (TEXT). Users can post #hashtags #our #cool.
I'm trying to run a database search using active record to find the specific hashtags.
When I run:
PHP Code:
$this->db->like("content", "#cool")->get("user_posts");
It doesn't correctly return all posts with the #cool, but instead all posts containing a #. I ran the query in PhpMyAdmin and it worked perfectly fine.
When I run $this->db->last_query(); it outputs pretty much the same SQL:
Code:
SELECT * FROM user_posts WHERE content LIKE '%#cool%' ESCAPE '!'Does anyone have any experience with what could be causing this issue?