<?php
$resource = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read');
$query = 'SELECT * FROM ' . $resource->getTableName('catalog/product');
$results = $readConnection->fetchAll($query);
var_dump($results);
i need sql query for get product price by sql
Best Answer
Magento is saved Product price at
catalog_product_index_price
and Here magento is saved customer group wise products price fields.So you needto inner join with this table.But is give you multiple rows for a products.By default it take one row when customer is not logged-in.
See table:
Here the Query:
Here i have put customer group id and its 0 for getting on a records product price