|
I'm not sure I followed exactly what you wanted to do, but let's see if I understand . . .
I know in PostgreSQL, you have the "count" function, that'll give you a count of the number of results. I assume MySQL has a similar function.
So just create a query for the for a category (alter this to taste, it's a pseudo-query), "SELECT count(l.*) FROM listing l, list_cat lc, category c WHERE l.listid=lc.listid AND lc.catid=c.catid AND c.name=<variable>;", where <variable> is insterted into the query in PHP. That should return you the number of the listings in a given category name.
|