CodeIgniter Forums
Remove wildcard from field then Group By using active record/mysql query - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Remove wildcard from field then Group By using active record/mysql query (/thread-32696.html)



Remove wildcard from field then Group By using active record/mysql query - El Forum - 07-31-2010

[eluser]RaZoR LeGaCy[/eluser]
I have been looking for this all over the net and I believe that I may be looking for the wrong terms.

I want to count(field_id) as tot, avg(field_score) as avg, and group by (field_title).

My problem is that I want MySQL to remove all wildcards before grouping field_title. I want title to be grouped but only after removing "[*]" and "(*)".

I would love to find an active record solution and the mysql query to learn this valuable complex query.

Thank you in advance.


Remove wildcard from field then Group By using active record/mysql query - El Forum - 08-01-2010

[eluser]RaZoR LeGaCy[/eluser]
example field_titles
1. Blue Green Red Fish [Remove me]
2. Blue Green Red Fish
3. Blue Green Red Fish (Remove me)

I want mysql to group the above into on group so they appear exact to mysql.

So all of the above will come back as one result set.


Remove wildcard from field then Group By using active record/mysql query - El Forum - 08-05-2010

[eluser]RaZoR LeGaCy[/eluser]
bump