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

            Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

            Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form