We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    I’m no expert and this is only tested on my DB, someone else may well offer a better solution, in the meantime try :
    <?php
    $siteName = $modx->config['site_name'];
    $output = '';
    $output .=  '<a href="advertisers.htm">CSB Sales Leads</a><br />
    		  <a href="index.htm">Return to Main Admin Page</a>
    		  <br /><br /><table border="1">
    <tr><th>First Name</th><th>Last Name</th></tr>';
    $result = mysql_query('SELECT * FROM `csb_leads` ORDER BY `firstname` ASC ');
    while($row = mysql_fetch_array($result))
    {
    $output .=  '<tr><td>' . $row['firstname'] . '</td><td>' . $row['lastname'] . '</td></tr>'."\n";
    }
    $output .=  '</table>';
    return $output;
    ?>

    I assume you don’t now need the external config file.
      • 506
      • 20 Posts
      Sweet, thanks Bunk! While you were working on that I was/am attempting ganeshXL’s suggestion too. So far so good except I am kind of stuck on his Step (f) not sure exactly where (line number) he is saying I should drop the code. Since I am almost finished with his method I am going to go ahead and roll through completing it. If it does not work for me I will take your code for a spin. Hell even if his method does work for me I am sure I still will use yours just to try multiple options.

      Thanks guys you’re awesome!
        • 506
        • 20 Posts
        Quote from: ganeshXL at Feb 25, 2008, 02:40 AM

        I wrote a little tutorial about adding a database table admin script as a modx-module the other day: http://modxcms.com/forums/index.php/topic,23176.msg142906.html#msg142906

        Maybe it helps.

        ganeshXL,

        could you please expand a bit on Step (f) from your post? What page exactly are you referring to when you say "editor-file"? Are you talking about the new module you say to create? And on which line of code should I drop it?

        Thanks bro!
          • 506
          • 20 Posts
          Bunk58,

          Thanks for jumping in and helping me out. I apologize if I wasted much of your time but I did not need your solution since I was able to get ganeshXL’s solution working before I tried yours. Bro I tell you, that dudes solution happened to be perfect for my needs. It merges the ease and power of commonly used apps such as "phpMyAdmin" to the MODx Manager! And only took a few minutes to get up and running. My client is going to be freakin in love with the added functionality. I can’t wait to tell her about it in the morning (don’t worry ganeshXL i’ll give you the creds and praise you deserve). I just wanted to tell you Bunk, because you may want to try it out for yourself. You may find it useful in your own client work/projects as I have.

          Thanks again!

          admix