Wordpress插件与数据库连接

Wordpress插件与数据库连接

问题描述:

I am using WordPress Version 2.9.2 for my blog.when i am trying to include a database connection in one of my plug-in which is not working properly.Which did not get the database connection.But in all other directory it is possible to use a common connection.So,now I am using manual coding in all of my plug-in file.Any ways to getting a common connection in all of my plug-in.Help me please...

我正在为我的博客使用WordPress版本2.9.2。当我试图在其中一个中包含数据库连接时 我的插件工作不正常。哪些没有得到数据库连接。但是在所有其他目录中都可以使用公共连接。所以,现在我在我的所有插件文件中使用手动编码。任何 在我的所有插件中获得公共连接的方法。请帮助我... p> div>

you should study more about wordpress

eg:

<?php
$table = "wp_table";
$data = $wpdb->get_results("SELECT * FROM $table WHERE 1=1", ARRAY_A);
?>

this a common connection