How to adjust number of columns generated by php classifieds script?
Hi there,
I'm in the process of setting up a classifeds site and modifying a script I bought to suit my purposes.
Basically the script is only allowing 2 columns of catagories to be printed on the main page (leaving a large empty gap on most of the right hand side of the screen) when I need there to be three or more. Is there a simple way of changing the number of columns?
I've trawled through the above script, but like I said already, I am a bit of a novice so don't know exactly what to look for.
I hope someone can help....
Thanks again folks, it's down to very helpful individuals such as yourselves that I'm managing to get anything done at all!
Robert
PHP Code:
// generates the Yahoo style table with all first and second level categories with number of listings and number of new listings
function generate_home_category_list($portal)
{
global $BBClass_verb;
$now = date("Y-m-d H:i:s");
$query = "SELECT classifieds_categories.*, COUNT(classifieds_listings.listing_id) AS item_count FROM classifieds_categories LEFT JOIN classifieds_listings ON
((classifieds_categories.category_id=SUBSTRING(classifieds_listings.category_id,1,2) OR classifieds_categories.category_id=SUBSTRING(classifieds_listings.category_id,1,4)) AND
classifieds_listings.status=20 AND classifieds_listings.exp_date >= '$now') WHERE (classifieds_categories.display=1 AND (classifieds_categories.category_id LIKE '__' OR classifieds_categories.category_id LIKE '____'))
GROUP BY classifieds_categories.category_id ORDER BY classifieds_categories.category_name, classifieds_categories.category_id";