phrozenfire Posted January 23, 2007 Share Posted January 23, 2007 Hi guys,Heres the situation, my client wants a search facility on the site. I can do this OK, but the problem that I am finding is that as I am searching a database, I have to type every single field in.eg "SELECT * FROM table WHERE name LIKE '%$search%' OR comment LIKE '%$search%'";However, there are 25 fields on this table, and many more thousands on the other tables, so is it possible to search a row rather than a specific column?Thanks in advance Link to comment https://forums.phpfreaks.com/topic/35431-searching-a-database/ Share on other sites More sharing options...
lunac Posted January 23, 2007 Share Posted January 23, 2007 To search a row, you would just select it key like "where id = 25" -- I don't think this what you are looking for.Do you mean, who can you create an on the fly query for the fields you actually want searched? Link to comment https://forums.phpfreaks.com/topic/35431-searching-a-database/#findComment-167655 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.