![]() | Join Date: Oct 2006 | Posts: 144 |
Help with qeury
I'm not good with mysql queries. I only know the basics plus a LEFT JOINS.
What I want to do is list all the categories from the user table which I can do but I want to output the number of rows called.
I had to add "empty" as the default because "WHERE hosting_category IS NOT NULL" wouldn't work.
What I want to do is list all the categories from the user table which I can do but I want to output the number of rows called.
I had to add "empty" as the default because "WHERE hosting_category IS NOT NULL" wouldn't work.
PHP Code:
$getlist = $db->query_read("SELECT hosting_category FROM " . TABLE_PREFIX . "user
WHERE hosting_category != 'empty'
GROUP BY hosting_category ");
--------------------
vHosting Pro
Manage you hosting requests easier
Xen Web Hosting
Offering ad-free hosting with features such as, cpanel, fantastico, PHP and MySQL support, and more
vHosting Pro
Manage you hosting requests easier
Xen Web Hosting
Offering ad-free hosting with features such as, cpanel, fantastico, PHP and MySQL support, and more





Linear Mode
