We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6513
    • 28 Posts
    Hello,

    I would like to somehow add the ability to insert, update and delete information from my DB via the admin area. These are tables I created and store all of my content. I need to be able to add new companies and their information to these DB tables and update information that changes over time.

    The actual queries are no big deal, but I need to know where or what to look for to get this to be another ’option’ or page in the backend - probably under a new menu item like ’Raw Company Data’ or something. I think this needs to be a component or a module but am not sure where to start.

    Any help is greatly appreciated smiley
      • 26931
      • 2,314 Posts
      Hi danpkraus,
      maybe this thread will get you started
      http://modxcms.com/forums/index.php/topic,44426.msg266285.html#msg266285
        • 28042 ☆ A M B ☆
        • 24,524 Posts
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 6513
          • 28 Posts
          These look like exactly what I need smiley Looks like I have a bit of work to do.

          Thanx for the info,
          Daniel
            • 6513
            • 28 Posts
            I have everything installed but I noticed that in the threads the module looks for modx_ prefix. My DB tables use danielk_modx as that is teh way my server provider has it set up. Username_prefix.

            But my tables within that DB that I wish to access have NO prefix. I am new to MySQL and prgramming in general so I may be missing something.

            Can I change the prefix dbedit looks for? Like adding danielk_ before the $prefix varible in the php file? (line 210)

            Like this
            if($l) $sql .= " WHERE Tables_in_{$dbase} NOT LIKE 'danielk_".$prefix."%'";
            


            Thanx,
            Daniel
              • 26931
              • 2,314 Posts
              not sure...i was just playing around with it. made those changes which lets me select whatever table is in my db:

              http://modxcms.com/forums/index.php/topic,32720.msg216325.html#msg216325
              http://modxcms.com/forums/index.php/topic,32720.msg216386.html#msg216386

              i recommend posting questions in the dbedit thread smiley
                • 6513
                • 28 Posts
                I made those changes as well, and dbedit still shows no tables. Tried re-installing, deleting, resetting everything I could think of and to no result. I am still working on it smiley

                Thanx,
                Daniel

                EDIT ########################

                I was confused smiley Everything is A OK smiley
                  • 6513
                  • 28 Posts
                  Now I get this error in the backedn:

                  "You don’t have permission to access /directorysexy/manager/index.php on this server.

                  Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
                  I changed the permisisons on the files but still no luck. Any ideas???

                  Thanx,
                  Daniel
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    The path is incorrect. It is trying to start from the root of your server’s file system (the leading / means that in a path) when what it needs is the root of your web space (which is what the leading / means in a URL).
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 6513
                      • 28 Posts
                      My Modx installation is in this URL -- http://projects.danielkraus-appserver.com/directorysexy/

                      So, if I understand you, sottwell, I need to change the path (/directorysexy/manager/index.php) somewhere in the files of the dbedit? I looked throught the files and could not find a designation for a ’path’ to this particular file. Or am I looking in the wrong place?


                      Thanx,
                      Daniel