Announcement

Collapse
No announcement yet.

[RELEASE v2] Run a SQL query directly from your admin contorl panel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [RELEASE v2] Run a SQL query directly from your admin contorl panel

    Description:
    I see a lot of people here who are trying to fix a problem or install a hack, sometimes requires them to run a SQL query on their database, and just don't know quite how.
    I know you can use Telnet, but not everyone has access, and I know there's phpMyAdmin, but who needs all that when you just need to update a table or add a field.
    Of course running select queries with this is not very useful, but I'm working on changing that.


    Main Features:
    - Run a single query
    - Run multiple queries
    - Option to show / not show query after execution
    - Confirmation page


    Demo:
    1.

    2.

    3.

    4.



    Installation:
    1. Unzip query.php from the attached zip file and upload to your admin folder.

    2. In index.php (under your admin folder), replace
    PHP Code:
    <tr><td>
    <table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
    <?php maketableheader("Options"); ?>
    </table>
    <a href="options.php?s=<?php echo $session[sessionhash]; ?>&action=options"> Change options </a>
    </td></tr>
    with
    PHP Code:
    <tr><td>
    <table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
    <?php maketableheader("Options"); ?>
    </table>
    <a href="options.php?s=<?php echo $session[sessionhash]; ?>&action=options"> Change options </a>
    </td></tr>

    <tr><td>
    <table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
    <?php maketableheader("SQL Queries"); ?>
    </table>
    <a href="query.php?s=<?php echo $session[sessionhash]; ?>"> Run a SQL query </a>
    </td></tr>

    That's it - can it get any more simple?
    Feedback, requests, future ideas and anything else is more than welcome.
    Chen Avinadav
    Better to remain silent and be thought a fool than to speak out and remove all doubt.

    גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

  • #2
    kool thanks for the hack m8 keep up the good work.

    Comment


    • #3
      Great Idea FireFly! Off to install this one Great thinking.

      Comment


      • #4
        Agree with Bane

        /me is off installing...
        Ueli

        Comment


        • #5
          Worked like a charm. But I have a suggestion:

          If I want to run a query which gives a result, e.g. the example query from mySQL
          Code:
          select BENCHMARK(1000000,encode("hello","goodbye"));
          it should display the result. Now it only repeats the query again since I set this option to yes.
          Ueli

          Comment


          • #6
            Thanks all for the comments.

            Originally posted by FireFly
            Of course running select queries with this is not very useful, but I'm working on changing that.
            Orca, I'll see what I can do.
            (btw, are you a female or a male? I've been wondering for days now )
            Chen Avinadav
            Better to remain silent and be thought a fool than to speak out and remove all doubt.

            גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

            Comment


            • #7
              As far as I know he's male (right?)
              Great hack btw
              -Tom
              http://www.mcseboard.de/images/buttons/lastpost.gif www.MCSEboard.de
              German Windows Server & IT Pro Community dedicated to Windows Client & Server Systems. MVPs inside

              Comment


              • #8
                interesting hack..
                :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                :: Nginx SPDY SSL - World Flags Demo [video results]
                :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                Comment


                • #9
                  great hack, so easy 2 install even me gran could have installed it!!
                  http://

                  Comment


                  • #10
                    I've been working on this alot today.
                    I wanna go to sleep, and I don't have time to create new screen shots, edit posts and such, so I'm just going to post this new file here and when I wake up I'll sort everything.

                    This has support for basic queries, such as
                    Code:
                    SELECT ... FROM ... WHERE
                    Basically almost everything, except for AS. Don't try using AS, it will not work.

                    To install this simply upload the new file and overwrite the old one.

                    A basic screen shot is available in the zip file. *yawn*

                    Please post any feedback and suggestions about this, so I could fix / add anything to the new re-release! Thanks!
                    Last edited by Chen; Fri 24th Aug '01, 2:24pm.
                    Chen Avinadav
                    Better to remain silent and be thought a fool than to speak out and remove all doubt.

                    גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                    Comment


                    • #11
                      This isn't as fancy but it can run every query MySQL can process. It gives columnized results and it works on all versions of vBulletin. This is probably my first hack ever for vBulletin and I have been using it successfully for the last year.

                      Just rename it query.php and put a link for it in index.php.
                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud demonstration site.
                      vBulletin 5 API - Full / Mobile
                      Vote for your favorite feature requests and the bugs you want to see fixed.

                      Comment


                      • #12
                        So you're saying I wasted a day of my life?
                        Thanks Wayne.
                        Chen Avinadav
                        Better to remain silent and be thought a fool than to speak out and remove all doubt.

                        גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                        Comment


                        • #13
                          Originally posted by FireFly
                          Orca, I'll see what I can do.
                          (btw, are you a female or a male? I've been wondering for days now )
                          Just checked: Still all male.
                          Ueli

                          Comment


                          • #14
                            Thumbs up dude

                            This is some serious hack! Small, easy to do and running fine!

                            Thnx

                            -Alex
                            I want to express my deepest compassion to all who have lost their loved ones in the latest terroristic attack

                            >> Nuke Bin Laden yourself here <<

                            Webmaster NE | Webmaster UA Forums | ArtworX ECL | Admin DiGL | Hosted at RWH | Portfolio

                            My Stylez
                            Red Darkness | Velvet Night | Dreadful Cyan
                            Goodiez
                            Table bgcolor change on hover | Onlinestatus modifications | German Templates

                            \\\ ///
                            ( )
                            -------------------ooO-(_)-Ooo-----------------

                            Comment


                            • #15
                              Thanks For the hack Firefly, This will make things alot easier.
                              Real Web Host

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X