hello .... i just want to ask.. what is the algorithm for searching a data in database.,. example : txtbox is equal to 060100 .. i want to search all the information about 060100.. thanks.. :D

Recommended Answers

All 3 Replies

select * from your_table where your_info_field like '%060100%'

hmmm.. thanks.. but i want to know the algorithm of that syntax.. is that a linear search???

The lookup would probably be performed in constant time. Otherwise why bother having a numerical key for your database table? I don't know what algorithm you're talking about though. I'd assume it is, at least conceptually, just an array of some sort. Then when you want to get all the info the lookup is done and all the data is returned.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.