Explanation about getSelect() join() joinLeft()getSelect and Join: Adding a shipment status to the Invoice Grid.phpMagento ER diagram of 1.9.xSubselect as main_table on magento collectionHow to join a table with a Magento 2 repositoryMagento 1.9 Where to get a full list of all magento functions / methods and their explanationsMagento sales_order_grid + join concatenated results from other queryRelationship between catalog_product_entity and cataloginventory_stock_itemMysql FULL JOIN in magento 2custom table left join with catalog/productvariable from CREDIT MEMO transactional email

Can a bald person be a Nazir?

How would timezones work on a planet 100 times the size of our Earth

Boss wants me to ignore a software API license prohibiting mass download

Chunk + Enumerate a list of digits

Website error: "Walmart can’t use this browser"

Why is the second S silent in "Sens dessus dessous"?

How to remove ambiguity: "... lives in the city of H, the capital of the province of NS, WHERE the unemployment rate is ..."?

Word for an event that will likely never happen again

Does EU compensation apply to flights where the departure airport closes check-in counters during protests?

Why aren't rainbows blurred-out into nothing after they are produced?

Case Condition for two lines

Telephone number in spoken words

Can the IPA represent all languages' tones?

What are those bumps on top of the Antonov-225?

How can God warn people of the upcoming rapture without disrupting society?

What is the farthest a camera can see?

How do some PhD students get 10+ papers? Is that what I need for landing good faculty position?

Can lodestones be used to magnetize crude iron weapons?

How is являться different from есть and быть

Possible to ground-fault protect both legs of a MWBC with two single-pole breakers?

Tempoverlustspiel

Graphs for which a calculus student can reasonably compute the arclength

PhD advisor lost funding, need advice

Is there a SQL/English like language that lets you define formulations given some data?



Explanation about getSelect() join() joinLeft()


getSelect and Join: Adding a shipment status to the Invoice Grid.phpMagento ER diagram of 1.9.xSubselect as main_table on magento collectionHow to join a table with a Magento 2 repositoryMagento 1.9 Where to get a full list of all magento functions / methods and their explanationsMagento sales_order_grid + join concatenated results from other queryRelationship between catalog_product_entity and cataloginventory_stock_itemMysql FULL JOIN in magento 2custom table left join with catalog/productvariable from CREDIT MEMO transactional email






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I don't understand these functions of Magento 1:




  • getSelect()

  • join()

  • joinLeft()



Where can I find a complete doc with all functions documentation ?



Thanks..










share|improve this question


























  • is this question about magento 1?

    – Amit Bera
    Aug 2 at 10:43


















1















I don't understand these functions of Magento 1:




  • getSelect()

  • join()

  • joinLeft()



Where can I find a complete doc with all functions documentation ?



Thanks..










share|improve this question


























  • is this question about magento 1?

    – Amit Bera
    Aug 2 at 10:43














1












1








1








I don't understand these functions of Magento 1:




  • getSelect()

  • join()

  • joinLeft()



Where can I find a complete doc with all functions documentation ?



Thanks..










share|improve this question
















I don't understand these functions of Magento 1:




  • getSelect()

  • join()

  • joinLeft()



Where can I find a complete doc with all functions documentation ?



Thanks..







magento-1.9 database query






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 2 at 10:45







Theo Cerutti

















asked Aug 2 at 9:12









Theo CeruttiTheo Cerutti

168 bronze badges




168 bronze badges















  • is this question about magento 1?

    – Amit Bera
    Aug 2 at 10:43


















  • is this question about magento 1?

    – Amit Bera
    Aug 2 at 10:43

















is this question about magento 1?

– Amit Bera
Aug 2 at 10:43






is this question about magento 1?

– Amit Bera
Aug 2 at 10:43











1 Answer
1






active

oldest

votes


















2















The All Explanation i am Providing is On the Basis Of Magento2 the
same will be in magento1 with some Syntax differences




You can use These Functions to Add Filters On your Database Collection



In your




VendorModuleNameModelResourceModelModuleNameCollection




Like



getSelect()



/**
* Get All Pages Have status Active
* @return Collection
*/
public function addFilterToStatus($status=1)

$this->getSelect()
->where('main_table.page_status = '.$status.' ');
return $this;



join()



 /**
* Get Collection of Specfic Customer Groups
* @param Integer
* @return Collection
*/
public function addFilterToCustomer($cusGroupId)

$this->getSelect()
->join(
['customer_groups' => $this->getTable('joined_table_name')], 'main_table.page_id = customer_groups.page_id', []
)->where('customer_groups.customer_group_id = (?)', $cusGroupId);

return $this;




In the same way You can use Left Join as Well






share|improve this answer





























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284197%2fexplanation-about-getselect-join-joinleft%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2















    The All Explanation i am Providing is On the Basis Of Magento2 the
    same will be in magento1 with some Syntax differences




    You can use These Functions to Add Filters On your Database Collection



    In your




    VendorModuleNameModelResourceModelModuleNameCollection




    Like



    getSelect()



    /**
    * Get All Pages Have status Active
    * @return Collection
    */
    public function addFilterToStatus($status=1)

    $this->getSelect()
    ->where('main_table.page_status = '.$status.' ');
    return $this;



    join()



     /**
    * Get Collection of Specfic Customer Groups
    * @param Integer
    * @return Collection
    */
    public function addFilterToCustomer($cusGroupId)

    $this->getSelect()
    ->join(
    ['customer_groups' => $this->getTable('joined_table_name')], 'main_table.page_id = customer_groups.page_id', []
    )->where('customer_groups.customer_group_id = (?)', $cusGroupId);

    return $this;




    In the same way You can use Left Join as Well






    share|improve this answer































      2















      The All Explanation i am Providing is On the Basis Of Magento2 the
      same will be in magento1 with some Syntax differences




      You can use These Functions to Add Filters On your Database Collection



      In your




      VendorModuleNameModelResourceModelModuleNameCollection




      Like



      getSelect()



      /**
      * Get All Pages Have status Active
      * @return Collection
      */
      public function addFilterToStatus($status=1)

      $this->getSelect()
      ->where('main_table.page_status = '.$status.' ');
      return $this;



      join()



       /**
      * Get Collection of Specfic Customer Groups
      * @param Integer
      * @return Collection
      */
      public function addFilterToCustomer($cusGroupId)

      $this->getSelect()
      ->join(
      ['customer_groups' => $this->getTable('joined_table_name')], 'main_table.page_id = customer_groups.page_id', []
      )->where('customer_groups.customer_group_id = (?)', $cusGroupId);

      return $this;




      In the same way You can use Left Join as Well






      share|improve this answer





























        2












        2








        2








        The All Explanation i am Providing is On the Basis Of Magento2 the
        same will be in magento1 with some Syntax differences




        You can use These Functions to Add Filters On your Database Collection



        In your




        VendorModuleNameModelResourceModelModuleNameCollection




        Like



        getSelect()



        /**
        * Get All Pages Have status Active
        * @return Collection
        */
        public function addFilterToStatus($status=1)

        $this->getSelect()
        ->where('main_table.page_status = '.$status.' ');
        return $this;



        join()



         /**
        * Get Collection of Specfic Customer Groups
        * @param Integer
        * @return Collection
        */
        public function addFilterToCustomer($cusGroupId)

        $this->getSelect()
        ->join(
        ['customer_groups' => $this->getTable('joined_table_name')], 'main_table.page_id = customer_groups.page_id', []
        )->where('customer_groups.customer_group_id = (?)', $cusGroupId);

        return $this;




        In the same way You can use Left Join as Well






        share|improve this answer
















        The All Explanation i am Providing is On the Basis Of Magento2 the
        same will be in magento1 with some Syntax differences




        You can use These Functions to Add Filters On your Database Collection



        In your




        VendorModuleNameModelResourceModelModuleNameCollection




        Like



        getSelect()



        /**
        * Get All Pages Have status Active
        * @return Collection
        */
        public function addFilterToStatus($status=1)

        $this->getSelect()
        ->where('main_table.page_status = '.$status.' ');
        return $this;



        join()



         /**
        * Get Collection of Specfic Customer Groups
        * @param Integer
        * @return Collection
        */
        public function addFilterToCustomer($cusGroupId)

        $this->getSelect()
        ->join(
        ['customer_groups' => $this->getTable('joined_table_name')], 'main_table.page_id = customer_groups.page_id', []
        )->where('customer_groups.customer_group_id = (?)', $cusGroupId);

        return $this;




        In the same way You can use Left Join as Well







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Aug 2 at 9:52

























        answered Aug 2 at 9:46









        Waqar AliWaqar Ali

        60616 bronze badges




        60616 bronze badges






























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284197%2fexplanation-about-getselect-join-joinleft%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

            Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?