below is my code
$result = Mage::getSingleton('core/resource')
->getConnection('core_read')
->fetchOne("SHOW TABLES LIKE 'dog_config'"); // error comes in this function
Can anyone help in resolving this. Thanks in advance
below is my code
$result = Mage::getSingleton('core/resource')
->getConnection('core_read')
->fetchOne("SHOW TABLES LIKE 'dog_config'"); // error comes in this function
Can anyone help in resolving this. Thanks in advance
Write your query as below:-
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
$sql = "Your_SQL_Query"; // write your sql query here
$result = $connection->fetchOne($sql); // You can use fetchRow($sql), fetchAll($sql) as per your need.
Note:- If still getting error then print $connection
before $rows
.
Check this link also.