mysql - Php sort with mysql_fetch_array -
im trying sort names sql
while($ddfg = mysql_fetch_array($result_skey002)) { $total = $ddfg['name2']; } sort($total); echo $total;
somthing ..,
im work name in hebrew doesnt working:
$query_skey002 = "select * s_keywords order `name2` asc";
i have no idea how work php sort function.
helpers
don't sort in php. database query doing that. no need sort twice. mysql can sort hebrew text if use correct charset/collation.
http://dev.mysql.com/doc/refman/5.0/en/charset-mysql.html
update:
here working example of inserting hebrew mysql table. tested , works:
mysql> create table hebrew_table (my_column varchar(128)) charset=hebrew; query ok, 0 rows affected (0.03 sec) mysql> insert hebrew_table (my_column) values ('אחד'); query ok, 1 row affected (0.00 sec) mysql> select * hebrew_table; +-----------+ | my_column | +-----------+ | אחד | +-----------+ 1 row in set (0.01 sec)
Comments
Post a Comment