Short and sweet on external page interfering with other connections (2 posts)

  1. clint6998
    Posted 3 years ago #

    OK, I have WP in my news folder. In my root folder, my index page uses Short and sweet to display my news feeds. Works fine. I am trying to run another query below it and it is giving me this error: Table 'tacticalonews.manufacturers' doesn't exist

    Here is my first line code for WP:

    /* Short and sweet */
    define('WP_USE_THEMES', false);

    Here is the display part in my HTML:

    $posts = get_posts('numberposts=20&order=DEC&orderby=post_title');
    foreach ($posts as $post) : start_wp(); ?>
    <a class="newsPostTitle" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); echo "<br />"; ?></a> 
    <p><?php the_excerpt(); ?> </p>
    <br />

    This works fine. My problem is in another div, I am trying to display content from another DB and that is where I get my error. When I remove the WP code, my query works fine so there is some kind of conflict.

    Here is other query:

    include 'xxxxx.php';
    $link = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("Couldn't make connection.");
    //List for brands carried
    $manufacturers = mysql_query("SELECT * FROM manufacturers ORDER BY manufacturers_name ASC") or die(mysql_error());
    while ($rrows = mysql_fetch_array($manufacturers)) { ?>
    <a href="#"><?php echo $rrows['manufacturers_name']?></a>,&nbsp;
    <?php } ?>

    Any ideas on how to resolve this connection issue?



  2. clint6998
    Posted 2 years ago #

    ok guys, i really need to know how to post my WP entries on non-WP pages without it interfering with other php queries. Can anyone help me? Obviously short and sweet dont work in this case. This is pretty much the last thing before letting my site go live.



Topic Closed

This topic has been closed to new replies.

About this Topic