Skip to main content
deleted 11 characters in body; edited tags
Source Link
7ochem
  • 7.6k
  • 14
  • 52
  • 80
$conn  = Mage::getSingleton('core/resource')->getConnection('core_write');
$sql = "UPDATE ...";
$result = $conn->query($sql);

How do I get the number of affected rows - i.e. mysql_affected_rows());

thanksmysql_affected_rows();

$conn  = Mage::getSingleton('core/resource')->getConnection('core_write');
$sql = "UPDATE ...";
$result = $conn->query($sql);

How do I get the number of affected rows - i.e. mysql_affected_rows());

thanks

$conn  = Mage::getSingleton('core/resource')->getConnection('core_write');
$sql = "UPDATE ...";
$result = $conn->query($sql);

How do I get the number of affected rows - i.e. mysql_affected_rows();

Tweeted twitter.com/#!/StackMagento/status/399930114068480000
Source Link
sdfor
  • 285
  • 1
  • 5
  • 13

How do I get the MySQL affected rows using the Magento resource?

$conn  = Mage::getSingleton('core/resource')->getConnection('core_write');
$sql = "UPDATE ...";
$result = $conn->query($sql);

How do I get the number of affected rows - i.e. mysql_affected_rows());

thanks