•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 402,605 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,252 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 458 | Replies: 10 | Solved
![]() |
•
•
Join Date: Aug 2007
Posts: 154
Reputation:
Rep Power: 0
Solved Threads: 0
Hello everybody,
I am using WAMP:
1. PHP 5..
2. MySQL 5..
3. Apache 2..
the collation of my database and tables and fields are 'utf8_persian_ci', and also my query is in this format in PHP:
this all utf8 is for my Arabic and persian words...
Problem:
I faced a problem on sorting english words, I dont know why the result on the browser is like the attachment
I am using WAMP:
1. PHP 5..
2. MySQL 5..
3. Apache 2..
the collation of my database and tables and fields are 'utf8_persian_ci', and also my query is in this format in PHP:
mysql_query("SET NAMES utf8");
mysql_query("SET CHARACTER SET utf8");
$query = mysql_query("SELECT * FROM tblName SORT BY fieldName COLLATE utf8_persian_ci");this all utf8 is for my Arabic and persian words...
Problem:
I faced a problem on sorting english words, I dont know why the result on the browser is like the attachment
•
•
Join Date: Aug 2007
Posts: 154
Reputation:
Rep Power: 0
Solved Threads: 0
I dont have farsi sort problem, but see the attachment, the problem is that the english words are not sorted correctly ...
also I enter through the web, mysql command line, phpMyAdmin the following data:
Asad
asad
Asad
asad
and again by executing the following query I get the same dispaly:
SELECT * FROM tblName order by fieldName;
or
SELECT * FROM tblName order by fieldName COLLATE utf8_persian_ci;
The Result:
Asad
asad
Asad
asad
also I enter through the web, mysql command line, phpMyAdmin the following data:
Asad
asad
Asad
asad
and again by executing the following query I get the same dispaly:
SELECT * FROM tblName order by fieldName;
or
SELECT * FROM tblName order by fieldName COLLATE utf8_persian_ci;
The Result:
Asad
asad
Asad
asad
Last edited by tanha : May 17th, 2008 at 7:38 pm.
•
•
Join Date: Aug 2007
Posts: 154
Reputation:
Rep Power: 0
Solved Threads: 0
Then if I try to use the binary, then it is ok, but you know that the binary sort according to ascii code of the character, then the following problem:
Asad
asad
Asad
asad
Bob
Tom
the output:
Asad
Asad
Bob
Tom
asad
asad
The sort must be like this:
Asad
Asad
asad
asad
Bob
Tom
Asad
asad
Asad
asad
Bob
Tom
the output:
Asad
Asad
Bob
Tom
asad
asad
The sort must be like this:
Asad
Asad
asad
asad
Bob
Tom
Last edited by tanha : May 17th, 2008 at 8:06 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Problem while installing linux (*nix Software)
- Can a power problem affect my hard drive? (Cases, Fans and Power Supplies)
- Insertion Sort Problem (C++)
- NIC Problem (PCI and Add-In Cards)
- RAM problem (Motherboards, CPUs and RAM)
- Desktop background hijacked-NEW Problem (Web Browsers)
- Desktop Background Hijacked-NEW Problem(! Smart Security) (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: Can i load my page before displaying it ??
- Next Thread: php form submitting empty variables


Linear Mode