How to make a search function for sql database , and how to get time when info from a table was edited?

前端 未结 2 1037
一向
一向 2020-12-12 06:27

I couldn\'t find : Lets say , I have 3 textboxes on my asp.net website:

1.Name ___________
2.Code ___________
3.ID   ___________

I want to

2条回答
  •  佛祖请我去吃肉
    2020-12-12 07:12

    Make another coulmn in your database & update with things changed by user with date...

    to search

    first make that coulmn indexed (for fast search)

    query will be like :

    select * from table where Item like @search+'%'
    

    or

    you can use match or contain query for full text search...

    remeber do not use query like

    select * from table where Item like '%'+@search+'%'
    

提交回复
热议问题