Skip to main content
100%

Gist 3898724

✓ Published0🌍 Public
Aallyraza
Last edited Oct 16, 2012
Created on Oct 16, 2012

This example demonstrates how to filter database entries by category using the Yii framework’s CDbCriteria API. It shows a query that selects entry names, addresses, and slugs alongside category names and slugs, joining the categories_entries and categories tables to match entries to their categories. The code compares the category name against a GET parameter, performing a case-insensitive match with downcase() or a partial name match via compare(). The visualization would display the resulting filtered dataset, though no rendering library is used in this PHP snippet.

AI-generated description

Similar vizzes