| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Soon to be RICHdoggie! Join Date: Jan 2005 Location: UK
Posts: 2,408
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Mysql counting query: I currently have this mysql query: Code: SELECT c.*, s.* FROM categories c, subcategories s WHERE c.cat_id=s.cat_id GROUP BY c.cat_id ORDER BY c.cat_name ASC ). in the table "subcategories" I have "cat_id" which is linked to the categories table, "subcat_id" which isn't really of any use in this script, and "subcat_name". in the "categories" table I have "cat_name" and I have "cat_id".????: NamePros.com http://www.namepros.com/programming/247220-mysql-counting-query.html How would I go about doing it? Thanks Tom |
| |
| | THREAD STARTER #3 (permalink) |
| Soon to be RICHdoggie! Join Date: Jan 2005 Location: UK
Posts: 2,408
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | no... but don't worry - i can do it another way. Its my egotistic coding style where I want to cram as much as i can into the smallest amount of space! hehe... its ok, ill split it all up a bit! hehe... thanks |
| |
| | #6 (permalink) | ||||
| Senior Member Join Date: Jun 2005 Location: Pennsylvania
Posts: 1,839
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
its the best way... less space, less bandwidth...
__________________ Poker News, articles, discussion LIKE THIS Its an iPod, a phone, and an internet communications device. | ||||
| |