Magento Custom Query Modify Category Page Layout

Run the below given script . It will set the value “’three_columns’” to the field “Page Layout” of all categories .

$write = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’);
$updateQry = “UPDATE catalog_category_entity_varchar SET value=’three_columns’ WHERE attribute_id=’61’ “;
$write->query($updateQry);