Hi Pham, how you doing? I am creating a LEGEND for all Categories in Event Booking and I have most of the code complete, but I am stuck on one thing. for some reason, no matter what php code I try, I cannot get the color_code and text_color fields out of the database. I can populate the title and description, but any call to 'color_code' comes back blank. I have color assignments for every category.
I am editing mod_eb_category.php
Can you please tell me what php code I can insert like a $sql_query to #__eb_categories, and echo $row->color_code? I am setting up boxes next to category names that will show the background color assigned to the category, if it is set.
// trying to get category color
$result = mysqli_query("SELECT color_code FROM #__eb_categories WHERE id='" . $row->id . "'");
$ccode = mysqli_fetch_assoc($result);
$cc = $ccode;
This is not working, I have tried several variations with no result. Once this is programmed, I am sure others will use it, I found a number of requests on your forum about this.