I can add phpadsnew in theme.php, and see the banner in top of my blog, but give this error:
There was an error while processing a database query
when remove my phpadsnew code in theme.php my gallery was worked very good.
It's probably changing the database connection. Enable debug mode to get the mysql error message that is caused. Posting the code would also help. You may have to add some code after the ads to re-select the coppermine database.
mysql_select_db($CONFIG['dbname'])
It may also be helpful to keep the ads in the same database as coppermine.
While executing query "SELECT count(*) FROM cpg134_albums as a WHERE category = '0'" on 0
mySQL error: Table 'adver.cpg134_albums' doesn't exist
thanks
switch from local mode to eg javascript invocation and all should be good
Quote from: Stramm on August 31, 2005, 01:46:14 PM
switch from local mode to eg javascript invocation and all should be good
no, this isn't way for me. i want use bye PHP.
Then you'll have to be a PHP coder to accomplish this.
Quote from: mlsbv on August 31, 2005, 01:29:36 PM
While executing query "SELECT count(*) FROM cpg134_albums as a WHERE category = '0'" on 0
mySQL error: Table 'adver.cpg134_albums' doesn't exist
thanks
Hi
I using as this code:
function banner() {
if (@include(getenv('DOCUMENT_ROOT').'/ad/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
$return = $phpAds_raw['html'];
mysql_select_db($CONFIG['gallery']);
}
return $return;
}
but, still is conflict database
Quote from: mlsbv on August 31, 2005, 01:29:36 PM
While executing query "SELECT count(*) FROM cpg134_albums as a WHERE category = '0'" on 0
mySQL error: Table 'adver.cpg134_albums' doesn't exist
thanks
Hi
I using as this code:
function banner() {
if (@include(getenv('DOCUMENT_ROOT').'/ad/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
$return = $phpAds_raw['html'];
mysql_select_db($CONFIG['gallery']);
}
return $return;
}
but, still is conflict database
this will help you
php.net/global
Nibbler, please help me.
Under
function banner() {
add
global $CONFIG;
Quote from: Nibbler on September 01, 2005, 12:27:21 PM
Under
function banner() {
add
global $CONFIG;
Hi, i put
global $CONFIG;
Quote
in
function banner() {
but not worked
please see the my function.
mysql_select_db($CONFIG['gallery']);
is corect?
No, use the code as I posted it.
mysql_select_db($CONFIG['dbname']);
Quote from: Nibbler on September 01, 2005, 01:10:53 PM
No, use the code as I posted it.
mysql_select_db($CONFIG['dbname']);
Thanks man. ;)