Hi,
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:
<br />
$username= "wordpress_user";<br />
$password = "wordpress";<br />
$hostname= "localhost"; </p>
<p>$dbhandle1 = mysql_connect($hostname, $username, $password)<br />
or die("Unable to connect to MySQL");</p>
<p>$selected = mysql_select_db("denco_1",$dbhandle1)<br />
or die("Could not select examples");</p>
<p>$result = mysql_query("SELECT szkolenia.temat, wykladowcy.nazwa, wykladowcy.oznaczenie, wykladowcy.id AS wykladowca_id, szkolenia.specjalnosc, szkolenia.id, szkolenia.pokaz FROM szkolenia LEFT JOIN wykladowcy ON szkolenia.prowadzenie = wykladowcy.oznaczenie WHERE szkolenia.pokaz = 'tak'");</p>
<p>if(mysql_num_rows($result) > 0) {<br />
while($row = mysql_fetch_object($result)) {<br />
echo "$row->specjalnosc."; }<br />
Plugin code examples:
<br />
[nggallery id=1]<br />
or
<br />
<?php do_action('slideshow_deploy', '74'); ?><br />
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 a 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..."); to $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.