I know that we can use it to get SQL query from the Magenta Model collection,
getSelect ();
But I can only get queries from the model collection, not working in others or maybe I do not use it.
Here I want to know the query is going on behind it,
$ productModel = Dana :: MillModel ('catalog / product') - & gt; GetCollection (); $ Attr = $ productModel- & gt; GetResource () - & gt; GetAttribute ("color"); If ($ attr-> uses the source (source)) {echo $ color_label = $ attr-> gt; GetSource () - & gt; GetOptionText ("28"); }
If I use this, then
echo $ product model - getSelect (); Go out;
I get only one part of the query, like,
SELECT `e` * `List_product_netiti`As`E`
Update:
This is my complete code,
& Lt; Php require_once ('app /Mage.php'); // Path to Magento Umascus (0); Dana :: Application (); $ Product Module = Dana :: MillModel ('Catalog / Product') - & gt; GetCollection (); $ Attr = $ productModel- & gt; GetResource () - & gt; GetAttribute ("color"); If ($ attr-> uses the source) ($ color_label = $ attr-> getSource () -> getOptionText ("28");} $ product model- gt; printlogquery (true); Exit
please help me,
of your order Status is not visible because your order is not visible because the order is added to the query during the load () method.
See Varien_Data_Collection_Db :: load ()
< / P> <
$ ProductModel-> printLogQuery (true); Hope this helps. $ productModel-> load (true);
Comments
Post a Comment