howto convert this query to Fabrik list

Rabadag

New Member
Hi forum. i need a query to a magento database and normally i use simple php code to query databases.
in magento is only the jdatabse allowed and i do not understand this new working cods
old school... !!!

now i want to query a database to display with php code on articel the list query from fabrik.
my old code from php

$result = mysql_query( "SELECT `value` AS product_name, `value_id` AS pid from catalog_product_entity_varchar WHERE entity_type_id = (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product') AND attribute_id = (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'name' AND entity_type_id = (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product'))");

now how to add this code to fabrik list to get the query. i need more fields in many div rent tables from Magento database.

ore is possible to use the connection to database via fabrik DB inside akticel ore include variable.
and after select and connect dbb use old school php code ?
mysql_query("select `name` from table WHERE access="admin");



Please help.
 
oh Tanks this is the best way.

just one question more : the getDbo(); is to select the database added in fabrik. my second database have the id 2

the Db select most now by: $db = JFactory::getDbo(2); ???
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top