CPG 1.5.8 - Database-Error in Logfile CPG 1.5.8 - Database-Error in Logfile
 

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

CPG 1.5.8 - Database-Error in Logfile

Started by taucher_0815, August 10, 2010, 06:22:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

taucher_0815

Hi Team!

Yesterday i upgraded my CPG (http://www.sk-foto.info) to the latest version of 1.5.8

Now checking the logs I found an error in the DB-Log.
QuoteWhile executing query 'SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id
FROM cpg15x_pictures AS r
INNER JOIN cpg15x_albums AS a ON a.aid = r.aid
WHERE (r.aid = 173) AND r.aid NOT IN (61, 6, 113, 144, 145, 156)
AND approved = 'YES'
AND hits > 0
ORDER BY hits ASC, pid DESC
LIMIT 0 ,-1121' in include/functions.inc.php on line 1593 the following error was encountered:
Fehler in der SQL-Syntax. Bitte die korrekte Syntax im Handbuch nachschlagen bei '-1121' in Zeile 8

Any Ideas?

Best regards
Sven

Αndré

Does it happen continuously or is it just a single entry?

taucher_0815

appeared a few times and then disappeared...
Marking it as resolved.

helmutmk

Hello,
I found the also information more than one time like this:

# 24. Oktober 2010 um 06:19 - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 the following error was encountered:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND' at line 1
# Oct 24, 2010 at 09:34 AM - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 the following error was encountered:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND' at line 1
# 24. Oktober 2010 um 09:48 - While executing query 'INSERT INTO cpg145_exif (pid, exifData) VALUES (3838, 'a:10:{s:13:\"VerboseOutput\";i:0;s:6:\"Errors\";i:0;s:9:\"ValidJpeg\";i:1;s:13:\"ValidIPTCData\";i:0;s:13:\"ValidJFIFData\";i:1;s:13:\"ValidEXIFData\";i:0;s:13:\"ValidAPP2Data\";i:0;s:12:\"ValidCOMData\";i:1;s:4:\"JFIF\";a:4:{s:4:\"Size\";i:16;s:4:\"Data\";s:14:\"JFIF\0\0\0\0\0\0\";s:10:\"Identifier\";s:5:\"JFIF\0\";s:13:\"ExtensionCode\";s:2:\"01\";}s:3:\"COM\";a:2:{s:4:\"Size\";i:59;s:4:\"Data\";s:57:\"CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 85
\";}}')' in include/exif_php.inc.php on line 57 the following error was encountered:
Duplicate entry '3838' for key 1
# Oct 24, 2010 at 09:54 AM - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 the following error was encountered:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND' at line 1

Αndré

Quote from: helmutmk on October 24, 2010, 11:46:47 AM
Hello,
I found the also information more than one time like this:

# 24. Oktober 2010 um 06:19 - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 the following error was encountered:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND' at line 1
# Oct 24, 2010 at 09:34 AM - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 the following error was encountered:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND' at line 1
# 24. Oktober 2010 um 09:48 - While executing query 'INSERT INTO cpg145_exif (pid, exifData) VALUES (3838, 'a:10:{s:13:\"VerboseOutput\";i:0;s:6:\"Errors\";i:0;s:9:\"ValidJpeg\";i:1;s:13:\"ValidIPTCData\";i:0;s:13:\"ValidJFIFData\";i:1;s:13:\"ValidEXIFData\";i:0;s:13:\"ValidAPP2Data\";i:0;s:12:\"ValidCOMData\";i:1;s:4:\"JFIF\";a:4:{s:4:\"Size\";i:16;s:4:\"Data\";s:14:\"JFIF\0\0\0\0\0\0\";s:10:\"Identifier\";s:5:\"JFIF\0\";s:13:\"ExtensionCode\";s:2:\"01\";}s:3:\"COM\";a:2:{s:4:\"Size\";i:59;s:4:\"Data\";s:57:\"CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 85
\";}}')' in include/exif_php.inc.php on line 57 the following error was encountered:
Duplicate entry '3838' for key 1
# Oct 24, 2010 at 09:54 AM - While executing query 'SELECT cid FROM cpg145_categories WHERE lft BETWEEN AND ' in include/functions.inc.php on line 47 the following error was encountered:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND' at line 1


Line 47 reads
Code (include/functions.inc.php) Select
$result = cpg_db_query("SELECT cid FROM {$CONFIG['TABLE_CATEGORIES']} WHERE lft BETWEEN $lft AND $rgt");

The variables $lft and $rgt are not populated in your case, but they should, as they are fetched some lines above:
        $result = cpg_db_query("SELECT rgt, lft, depth FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid = $cat LIMIT 1");
        list($rgt, $lft, $CURRENT_CAT_DEPTH) = mysql_fetch_row($result);


Please check your categories table if all rows have entries for that fields.

Αndré

Here is some new information regarding to taucher_0815's issue.