What is the full SQL query for product load?
I mean, how to get the full SQL query for this code:-
$productId = 52;
$product = Mage::getModel('catalog/product')->load($productId);
I know, we can get the SQL query for collection object through printLogQuery. Example:-
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->printLogQuery(true);
I couldn’t find such for product load(). Any idea?
load()is actually the method which execute query on database. For that reason there is no option to “find such for productload()“. Final query is generated beforeload()method.Additionaly, easier method to get query on the screen for example is (on your example):