coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: mitring on March 06, 2009, 09:05:56 AM

Title: Simple Select from another PHP project.
Post by: mitring on March 06, 2009, 09:05:56 AM
I have a problem with a simple SQL query.
I have a file: test.php with db_connect to  Coppermine database.
Simple select to cpg_comments table and I have the wrong encoding.

How to write correnct code to see correct encoding ?

SELECT * FROM cpg_comments
and I have:
óóóÅ,Å,Å,Å,śśśÄ�

Structure table cpg_comments:
CREATE TABLE `jos_chrono_comments` (
 `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
 `component` VARCHAR(255) COLLATE utf8_general_ci NOT NULL DEFAULT '',
 `pageid` VARCHAR(255) COLLATE utf8_general_ci NOT NULL DEFAULT '',
 `parentid` INTEGER(11) NOT NULL,
 `userid` INTEGER(11) NOT NULL,
 `name` VARCHAR(255) COLLATE utf8_general_ci NOT NULL DEFAULT '',
 `email` VARCHAR(255) COLLATE utf8_general_ci NOT NULL DEFAULT '',
 `url` VARCHAR(255) COLLATE utf8_general_ci NOT NULL DEFAULT '',
 `text` LONGTEXT NOT NULL,
 `datetime` DATETIME NOT NULL,
 `rating` INTEGER(11) NOT NULL,
 `verify` TINYINT(1) NOT NULL,
 `uniqueid` VARCHAR(255) COLLATE utf8_general_ci NOT NULL DEFAULT '',
 `published` TINYINT(1) NOT NULL,
 PRIMARY KEY (`id`)
)ENGINE=MyISAM
AUTO_INCREMENT=303 CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
Title: Re: Simple Select from another PHP project.
Post by: Joachim Müller on March 06, 2009, 09:28:48 AM
Not related to bridging, moving.
There's too little input in your posting - post more details (i.e. code used). Posting a link to your gallery might help as well. Posting what encoding you chose in coppermine's config could be another thing that potential supporters would like to know. If you want details, post details.