You are here:  » Wordpress integration

Support Forum



Wordpress integration

Submitted by redspark on Wed, 2009-12-09 21:54 in

Hi David,

I'm trying to setup a wordpress integration (on a windows 2003 server) but i get some errors i haven't seen in the forum before. In my post i get the following error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\inetpub\vhosts\top10online.nl\httpdocs\wp-produkten\includes\database.php on line 21

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\inetpub\vhosts\top10online.nl\httpdocs\wp-produkten\includes\database.php on line 26

and at the bottom: WordPress database error Table 'top10produkten.wp_terms' doesn't exist for query SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('category') ORDER BY t.name ASC made by require, require_once, include, thematic_sidebar, get_sidebar, locate_template, load_template, require_once, dynamic_sidebar, call_user_func_array, wp_widget_categories->display_callback, wp_widget_categories->widget, wp_list_categories, get_categories, get_terms WordPress database error Table 'top10produkten.wp_options' doesn't exist for query SELECT option_value FROM wp_options WHERE option_name = 'widget_thematic_rsslinks' LIMIT 1 made by require, require_once, include, thematic_sidebar, get_sidebar, locate_template, load_template, require_once, dynamic_sidebar, call_user_func_array, widget_thematic_rsslinks, get_option WordPress database error Table 'top10produkten.wp_terms' doesn't exist for query SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('post_tag') AND tt.count > 0 ORDER BY tt.count DESC LIMIT 45 made by require, require_once, include, get_footer, locate_template, load_template, require_once, get_sidebar, locate_template, load_template, require_once, dynamic_sidebar, call_user_func_array, wp_widget_tag_cloud->display_callback, wp_widget_tag_cloud->widget, wp_tag_cloud, get_terms

Any ideas?

regards,

B.

Submitted by support on Wed, 2009-12-09 21:58

Hi there,

Yes - what sometimes happens - if the database connections use the same credentials - is that the Price Tapestry connection overwrites the WordPress connection; and then WordPress doesn't try to recreate it so any subsequent queries fail.

To fix this, in your includes/database.php (of the Price Tapestry installation) look for the following code on line 13:

    $link = @mysql_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword);

...and REPLACE this with:

    $link = @mysql_connect($config_databaseServer,$config_databaseUsername,$config_databasePassword,TRUE);

The TRUE parameter makes sure that Price Tapestry uses it's own database connection and does not overwrite the WordPress connection...

Cheers,
David.