You can increase or decrease the memory size limit for php through the .htaccess file with the following command :
php_value memory_limit 50M
You can increase or decrease the memory size limit for php through the .htaccess file with the following command :
php_value memory_limit 50M
In WordPress the $wpdb object can talk to any number of tables, but only within database WordPress is installed. In case you need to connect to another database, you will have to instantiate your own object from the wpdb class with the appropriate connection details:
$mydb = new wpdb( 'username' , 'password' , 'database' , 'localhost' );
Once the connection is made you can access the database and its tables as you would in any WordPress database:
$rows = $mydb->get_results("SELECT field1,field2 FROM myTable WHERE field3=1");
foreach ($rows as $row) {
echo $row->field1;
}
This code can be in plugins, templates, themes and almost anywhere else inside the WordPress code.