how make a plugin with the db connection
-
i have in this function that i would use like a plugin the connection to the db:
function rate($id) {
$dbhost = 'localhost';
$dbuser = 'user';
$dbpass = 'password';
$dbname = 'wordpress';$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname);$tableName="test";
If i use this like a plugin is not necessary create the db connection, right ? And if the same plugin have another file that call the db, what i do ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘how make a plugin with the db connection’ is closed to new replies.