Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Searching text with SQL

Name: Anonymous 2008-07-02 17:18

Database with various text fields. When user searches the site wish to check 3 of those fields for the matching search term [name, filename, comment]. Basic level just needs to return any rows that match the search term in any of the 3 fields. The fields are all short no more than 256 characters.

What would be the most practical and efficent way to implement this in SQL? Looking for things like datatypes, type of search query(LIKE etc.) or any other ideas like a new combined field.

Already have code in and working fine but curious to learn better ways to implement it from programmers stronger at SQL.

Name: Anonymous 2008-07-02 19:08

>>4
>>5
Once a row is added the data in the fields are unlikely to change often if at all. How about adding another field onto the table and fill it with name+filename+comment and put fulltext index on that field. Would that be significantly faster than searching over the 3 fulltext indexed fields to justify the increase in database size?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List