Outputting data from a query into a block
Permalink
Hello,
Im creating my first block:
I have a query in my controller.php which is pulling out info. I now need to take the information from the query and output the rows it in my view.php.
Firstly I think I need to assign each value to a variable and then loop round each row for multiple results. The loader::db() doesnt explain how to do this.
Any help would be great:
(my code so far)
Im creating my first block:
I have a query in my controller.php which is pulling out info. I now need to take the information from the query and output the rows it in my view.php.
Firstly I think I need to assign each value to a variable and then loop round each row for multiple results. The loader::db() doesnt explain how to do this.
Any help would be great:
(my code so far)
function getCategories() { $db = Loader::db(); $r = $db->Execute("SELECT * FROM btwbproviders WHERE provider_category = '{$Category}' "); }
http://www.concrete5.org/community/forums/customizing_c5/calling-a-...