Menu

#819 Increasing SQL Select Limit from 50 to 100 - HardCode

Git
closed-rejected
nobody
None
5
2025-02-19
2021-09-22
MarcoCzen
No

Hi,

SELECT * FROM app_setup_targets LIMIT 50

From the above example, can we hard code this so that every sql select query has a default of 100 instead of 50 ?

How do i change this value ?

Discussion

  • Stephan

    Stephan - 2021-09-28

    The simplest solution is to write a simple plugin and use the method Adminer::selectLimitProcess()

    class myOwnPlugin {
    
        //default number of rows before paging
        function selectLimitProcess() 
        {
            if(!isset($_GET["limit"]))
                return 100;
        } 
    }
    

    And then you use that as a new plugin and define it in the $plugins array:

       $plugins = array(
            // specify enabled plugins here
            new myOwnPlugin(),
        );
    

    for more details, have a look here: https://www.adminer.org/en/plugins/#use

     
  • Jakub Vrána

    Jakub Vrána - 2025-02-19
    • status: open --> closed-rejected
     

Log in to post a comment.

MongoDB Logo MongoDB