ORDER BY name ASC

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Armenhui
Posts: 71
Joined: Fri Oct 16, 2015 12:44 pm

ORDER BY name ASC

Post by Armenhui »

Hi all,

I use ORDER BY name ASC Sqlite command in my code, for getting form names in alphabetical order, it works on Desktop environment but on mobile devices (iOS,Android) it doesn't work.

Full select code is this

Code: Select all

   put "SELECT * FROM form  INNER JOIN icons ON form.iconid = icons.iconid ORDER BY name ASC" into tSQL   
   
   put revQueryDatabase(sDBID, tSQL) into tCursor
   put dbSQLToArray(tCursor, tFormArray) into tError
   
   if tError is empty then
      return tFormArray
   end if

Any suggestion will be helpful.

Thanks,
Armenuhi
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: ORDER BY name ASC

Post by FourthWorld »

Where is dbSQLToArray defined? And can you describe more specifically what "doesn't work" means in this case?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Armenhui
Posts: 71
Joined: Fri Oct 16, 2015 12:44 pm

Re: ORDER BY name ASC

Post by Armenhui »

I understood which is the causing the problem, when the user insert form name in lowercase to database, and then select with order by ASC command it does not work because the database is case sensitive. And user needs to insert first letter uppercase word
Post Reply