Reputation: 61
Im trying to sort hebrew in sql and print it in php..
I tried to do:
$query_skey002 = "SELECT * FROM `s_keywords` ORDER BY `name2` ASC";
Dont work..
I tried to use php sort function but i dont know how to sort sql array in this function
Thanks for the helpers..
Upvotes: 4
Views: 924
Reputation: 15949
Strangely enough ( or not so strange if you know that Zend is an IL company) , a simple
sort($query_skey002);
in PHP
should do for HE...
Upvotes: 0
Reputation: 61
I solved it..
i just changed the query to
$query_skey002 = "SELECT * FROM `s_keywords` ORDER BY BINARY `name2` ASC";
Thanks for everybody !..
Upvotes: 0
Reputation:
If i'm not mistaken and you mean how to sort based on alphabetical order, then you need to use a proper COLLATION fro your table. probably utf8-general does the job
Upvotes: 0
Reputation: 4268
MySQL can sort hebrew
text if you use the correct charset/collation.
http://dev.mysql.com/doc/refman/5.0/en/charset-mysql.html
Upvotes: 2