Whem i am trying to fetch sql query in my magento's controller it's display this error
SQLSTATE[HY000]: General error
HERE is my code
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
$sql = "DELETE FROM marketplace_sellernotification WHERE seller_id =".$sellerId;
$rows = $connection->fetchAll($sql);
header('Location: ' . $_SERVER['HTTP_REFERER']);
$sellerId
to always be an integer. Better: use prepared statements. Even better: use the appropiate Magento resource model.