CodeIgniter Forums

Full Version: Remove wildcard from field then Group By using active record/mysql query
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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.

El Forum

[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.

El Forum

[eluser]RaZoR LeGaCy[/eluser]
bump