I have this code:
$sql = "SELECT * FROM alexa WHERE alexapr BETWEEN 01 AND 20 ORDER BY alexapr ASC LIMIT 20";
Which give this result:
google.com 1
qq.com 10
msn.com 11
yahoo.co.jp 12
taobao.com 14
google.co.in 15
sina.com.cn 16
amazon.com 17
google.de 17
wordpress.com 18
linkedin.com 18
facebook.com 2
youtube.com 3
yahoo.com 4
blogspot.com 5
baidu.com 6
wikipedia.org 7
live.com 8
twitter.com 9
It’s showing Alexa ranking of top sites, How to get number in sequence like 1,2,3,4,5 etc. Why it’s showing 10,11,12 after 1? I want 1,2,3,4,5 and so on.
Change your alexapr column type to integer.
ALTER TABLE alexa CHANGE alexapr alexaprINTEGER IF you’re on mysql