1.

Explain how to write custom SQL Query in Magento?

Answer»

We can write custom QUERIES in Magento. PLEASE FOLLOW the below given examples.

Example

$resource = MAGE::getSingleton(\'core/resource\');
$readConnection = $resource->getConnection(\'core_read\');
$var_query = \'SELECT * FROM products_table\';
$var_results = $readConnection->fetchAll($var_query);
var_dump($var_results);



Discussion

No Comment Found