Query for searching the name alphabetically

前端 未结 5 1279
梦谈多话
梦谈多话 2020-12-12 06:04

I have used the LIKE condition, but it required me to enter the full name into the database to find the name.



        
5条回答
  •  悲哀的现实
    2020-12-12 06:21

    WhiteFang34 also said you need to iterate. But also you need to change to WHERE clause:

    "SELECT * FROM FAMILYcensus WHERE Name > '"+ tfsearch.getText()+"' ORDER BY Name ASC LIMIT "+MAXRESULTS;
    

    Note that limiting the number of results is a good idea here.

提交回复
热议问题