connect to external db from page (3 posts)

  1. water
    Posted 10 years ago #

    is it possible to connect to extaernal databases from a wordpress page using exec_php?

    i gave it a very quick try but got an error that told me that it was looking for the tables in the wp database and not the external one.


  2. water
    Posted 10 years ago #

    to clarify my post above, my goal is to query another database than the wordpress database and print a list of gigs like on this page : http://www.werock.org/live.php

    if this turns out to work to my liking i'm going to seriously consider migrating the whole http://www.werock.org site to wordpress.


  3. davidchait
    Posted 10 years ago #

    create custom page template with your custom db code.
    create new WP Page, select custom page template.

    should work.

    the PHP execution plugins should all reasonably be able to do this too. I use my CG-QuickPHP to include a file into a page, or call a single function, when I just have one quick thing to do... Otherwise, I use custom page templates -- just easier to manage complex code rather than embedded into a page/post.


Topic Closed

This topic has been closed to new replies.

About this Topic