• Hello,

    I have done a lot of searching and reading regarding this issue I am having..

    Basically, I am trying to establish a new database connection on a wordpress page in order to grab content from my own CMS.

    <? require_once ('../path/to/database/connect/scipt/connect.php'); // Connect to the db. ?>

    (Above) So I link to my db connect script (which works as it is working on other pages in my site)

    <?php $query = "SELECT link, art_id, date_format(date_time, ' %b ') as month, date_format(date_time, ' %d ') as day, title, summary, content FROM nav LEFT JOIN news USING (nav_id) WHERE active = 'yes' ORDER BY date_time DESC LIMIT 0,5";.... etc etc ?>

    (Above) The query of the database etc…

    However, It seems as though it is trying to query the wordpress database ($wpdb).

    If anyone could help, I would be very appreciative.

    Many thanks,

    James

Viewing 1 replies (of 1 total)
  • Just to help get closer to an answer…

    Are you still going to need the $wpdb connection or are you just adding a second database connection?

    Also, could you post the actual database calls so we see how you are performing the query by calling the db?

Viewing 1 replies (of 1 total)
  • The topic ‘Make a new database connection’ is closed to new replies.