Query Help
Posted: Thu May 31, 2007 11:55 am
Hello,
I'm having an odd problem. The query below is pulling from two tables. The table "category" has 11 records. When PHP displays the record in a loop, it will display "project_name" 11 times for each project. If I add another "category" record, it will display "project_name" 12 times. I only need / want each record to display once. Any help would be appreciated.
I'm having an odd problem. The query below is pulling from two tables. The table "category" has 11 records. When PHP displays the record in a loop, it will display "project_name" 11 times for each project. If I add another "category" record, it will display "project_name" 12 times. I only need / want each record to display once. Any help would be appreciated.
Code: Select all
SELECT project_id,project_name,category_full FROM project,category WHERE project_cat LIKE'%$cat%' ORDER BY project_name ASC