MySQL Forums
Forum List  »  PHP

utf8_persian_ci
Posted by: majid naraghi
Date: April 13, 2010 07:21AM

hi
Im using this code for creating my table

CREATE TABLE `cities` (
`Name` char(64) NOT NULL default '',
`ID` int(11) NOT NULL auto_increment,
`Members` int(11) NOT NULL default '0',
PRIMARY KEY (`ID`),
UNIQUE KEY `Name` (`Name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;

when Im using phpmyadmin for inserting rows, evrything works fine and table shows correctly sorted (in phpmyadmin) but when Im using php to retrive rows with this query: "select * from cities"
fetched rows having wrong charset and all chacters shows as a question mark "?".
when Im inserting data in my code, I can retrive datas but with some wrong chars and invalid sort order.

anyone knows why&how phpmyadmin works fine, but I cant retrive correct datas?

thanks

Options: ReplyQuote


Subject
Written By
Posted
utf8_persian_ci
April 13, 2010 07:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.