forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: mlsbv on August 31, 2005, 01:08:22 pm
-
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
-
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.
-
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
-
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;
-
Under
function banner() {
add
global $CONFIG;
Hi, i put
global $CONFIG;
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']);
-
No, use the code as I posted it.
mysql_select_db($CONFIG['dbname']);
Thanks man. ;)