I can add phpadsnew, and see the banner, but I can add phpadsnew, and see the banner, but
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

I can add phpadsnew, and see the banner, but

Started by mlsbv, August 31, 2005, 01:08:22 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

mlsbv

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.

Nibbler

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.

mlsbv




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

Stramm

switch from local mode to eg javascript invocation and all should be good

mlsbv

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.

Joachim Müller

Then you'll have to be a PHP coder to accomplish this.

mlsbv

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

mlsbv

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

Stramm


mlsbv


Nibbler


mlsbv

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?

Nibbler

No, use the code as I posted it.

mysql_select_db($CONFIG['dbname']);

mlsbv