hello....

i am fully confussing with this problem. i have to display sorting order from my table. i have table like this.

auto_id,firstname,passportno(int).

now i am displaying

order by passportno

but here i saw very funny issue.
i have passport nos like this.....

077,100,099,088,101,1000.

now after executing the query

"SELECT * FROM passport_registration ORDER BY passportno LIMIT $start , $q_limit"

diaplaying like this.

77,88,99,100,101,1000

even i tested in phpmyadmin also...displaying same. what to do? i want to display 077,088,099 exactly

Recommended Answers

All 4 Replies

Member Avatar for rajarajan2017

Int type always neglect the leading zeros.

i have passportno(varchar) in database.
i am entering values like this 001,002,003. and i want to display like sorting order.

now i wrote query like this `"select * from passport_registration where status=1 ORDER BY passportno"` then displaying output like this......`077,088,099,100,1000,1001,1009,101,1010`
i want to diplay sort order. how to do?

.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.