By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,642 Members | 1,687 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,642 IT Pros & Developers. It's quick & easy.

More of a mysql question

P: n/a
$result = mysql_query("SELECT * FROM dept WHERE notes LIKE
'%$searchstring%'",$db);

The above is a part of a search program that I've written in PHP to
search the contents of a mysql DB. In the example, I search through a
filed named 'notes', however, I'd like to be able to search every field
in the DB, not just notes... any pointers on how to do this? I've tried
replacing the field name with *, but that doesn't work.

Thanks!

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
hokieghal99 wrote:
$result = mysql_query("SELECT * FROM dept WHERE notes LIKE
'%$searchstring%'",$db);

The above is a part of a search program that I've written in PHP to
search the contents of a mysql DB. In the example, I search through a
filed named 'notes', however, I'd like to be able to search every field
in the DB, not just notes... any pointers on how to do this? I've tried
replacing the field name with *, but that doesn't work.


<http://www.mysql.com/doc/en/Searching_on_two_keys.html> or
<http://www.mysql.com/doc/en/Fulltext_Search.html> might be useful here.
Matthias

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.