dongmaoxi0477 2016-03-14 13:02
浏览 51

如何使用PHP和MySQL中的字母搜索从数据库中获取数据

I need one help.I need to get data while user is typing letter inside text field from database using PHP and MySQL.I am explaining my code below.

$searchData=$_GET['search'] ;

In the above line user is getting the letter typed by user and once one letter will be typed the according to key word search the data will fetch from data base.I am explaining the table below.

db_name:

id    name     status

1      Raj      1    

2      Rahul     1   

3      Dog       1

4      Deer      1

Suppose user typed the the first letter R the all two names belongs to R should display and the single name will come when full name will be typed.Please help me to resolve this problem.

  • 写回答

2条回答 默认 最新

  • donglao4370 2016-03-14 13:07
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line