coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Tophux95 on November 22, 2007, 11:38:41 AM

Title: problem with rating picture
Post by: Tophux95 on November 22, 2007, 11:38:41 AM
 hello,
   
    I have a problem with the rating of the photos it does not work anymore I get the error message
------------------------------------------------------------------------------------------------------------------
While executing query "INSERT INTO cpg_vote_stats
                  SET
                    pid = 2259,
                    rating = 5,
                    Ip   = '83.114.76.155',
                    sdate = '1195727291',
                    referer = 'http%3A%2F%2Fwww.reflex-photo.org%2Fdisplayimage.php%3Falbum%3Dlastup%26cat%3D0%26pos%3D3',
                    browser = 'Unknown',
                    os = 'Unknown'" on 0

mySQL error: Duplicate entry '255' for key 1
-----------------------------------------------------------------------------------------------------------------

and debug window :
-----------------------------------------------------------------------------------------------------------------

USER:
------------------
Array
(
    [ID] => 592343bcda9709f39a16030c1d9d5b7d
    [am] => 1
    [lang] => french
    [lap] => 2
    [liv] => Array
        (
           
Title: Re: problem with rating picture
Post by: Nibbler on November 22, 2007, 12:06:53 PM
Ensure the `sid` field on the cpg_vote_stats table is set as INT using phpMyAdmin. Seems like you may have it set as TINYINT.
Title: Re: problem with rating picture
Post by: Tophux95 on November 22, 2007, 12:25:49 PM
hello,

think for help,

after

     ALTER TABLE `cpg_vote_stats` CHANGE `sid` `sid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT

its Ok