Welcome Guest, Not a member yet? Register   Sign In
Ci4 orderBy Float Value
#3

(This post was last modified: 08-22-2021, 08:51 PM by nfaiz.)

(08-22-2021, 07:27 AM)hieuhiti Wrote: Hi All,
I have a little problem with sort values (Float type) from database mysql.
I use -> orderBy("FieldFloat","desc"), 
But incorrect result, Please helpme

Check your datatype.

or you can try
PHP Code:
$builder->select('(FieldFloat * 1) AS FieldFloat, Field2');
$builder->orderBy('FieldFloat','desc'); 
Reply


Messages In This Thread
Ci4 orderBy Float Value - by hieuhiti - 08-22-2021, 07:27 AM
RE: Ci4 orderBy Float Value - by ikesela - 08-22-2021, 12:22 PM
RE: Ci4 orderBy Float Value - by nfaiz - 08-22-2021, 08:26 PM
RE: Ci4 orderBy Float Value - by InsiteFX - 08-23-2021, 01:46 AM
RE: Ci4 orderBy Float Value - by hieuhiti - 08-23-2021, 09:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB