Support » Fixing WordPress » WordPress Plugins and custom mySQL query conflict

  • Resolved pp_1



    What’s wrong: When I use mySQL custom query on one of pages AND I have some plugins I experience a conflict.

    My custom query works well, but plugins show errors (Can’t connect to gallery, can’t find gallery etc.) or don’t show up at all.
    Custom query OR plugin -> everything’s just fine.

    An example of code:

    $username= "wordpress_user";
    $password = "wordpress";
    $hostname= "localhost";
    $dbhandle1 = mysql_connect($hostname, $username, $password)
    or die("Unable to connect to MySQL");
    $selected = mysql_select_db("denco_1",$dbhandle1)
    or die("Could not select examples");
    $result = mysql_query("SELECT szkolenia.temat, wykladowcy.nazwa, wykladowcy.oznaczenie, AS wykladowca_id, szkolenia.specjalnosc,, szkolenia.pokaz FROM szkolenia LEFT JOIN wykladowcy ON szkolenia.prowadzenie = wykladowcy.oznaczenie WHERE szkolenia.pokaz = 'tak'");
    if(mysql_num_rows($result) > 0) {
    while($row = mysql_fetch_object($result)) {
    echo "$row->specjalnosc"; }

    Plugin code examples:

    [nggallery id=1]


    <?php do_action('slideshow_deploy', '74'); ?>

    Doesn’t matter if plugin (or widget) is in the same column with query or in the sidebar / footer. It seems that plugins that need an sql connection don’t work when I use it…

    What I’ve already tried:
    -Wordpress update (twice, two last versions) -no difference;
    -My theme (Atahualpa) update -no difference;
    -Switch theme to Twenty Ten and Eleven – no difference;
    -rename $username, $password, $hostname and $dbhandle variables -no difference;
    -change php handling plugin (3 different)- no difference;
    -import tables I need to wordpress database -no difference;
    -import tables I need to wordpress database AND change
    $result = mysql_query("Select...");
    $result = $wpdb->get _results("Select...)-no difference
    -add and remove
    mysql_close(); -no difference;

    I’m out of ideas, I’d appreciate your help very much.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Plugins and custom mySQL query conflict’ is closed to new replies.