If you need to execute a MySQL query anywhere in Magento (in the .php code files or .phtml template files), the following steps are required –
$conn = Mage::getSingleton('core/resource')->getConnection('core_write'); $conn->query("insert into table name (fields) values (values) ");
Can you please tell me what to use instead of mysql_fetch_object or mysql_fetch_assoc in magento.
You can write the following to fetch:
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
$result = $connection->query("select * from table");
while ($row = $result->fetch() ) {
$ids[]=$row['id'];
}
Good Block…
$con = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’);
$result = $con->query(“select * from table”);
while ($row = $result->fetch() )
{
$record[]=$row[‘field name’];
}
Hi,
I can i get some particular data table in Quickbooks ?
any idea ?
sorry for the wrong sentence in my last comment!!!!!
Actually my question is how i can get particular datatable in Quickbooks
any idea ????
@techfellas Did you have any luck with Quickbooks integration?