Page 1 of 1

Searching for text in a database

Posted: Wed Nov 09, 2005 8:50 pm
by Covenant
How do you search for text/words/sentences in a TEXT field in a database?

Let's say this is a text field (named popularity) in Jimmy's row:
sarah=25, jessie=14, sam=33, kelly=42, joe=7
How would you just return just the number after Sarah?

i.e. (this isn't the real thing obviously)

Code: Select all

mysql_query("SELECT from subscribers where owner='Jimmy', SEARCH for word sarah in 'popularity' field, return the number 25");
Okay that was confusing.

And if you can't answer that one, at least answer this one: The following code, is it compatible with all browsers and guaranteed to successfully redirect everytime?

Code: Select all

<meta http-equiv=\"refresh\" content=\"3; url=SOME URL\">
Is there some other redirection script compatible with all browsers?

Posted: Wed Nov 09, 2005 10:00 pm
by feyd
look up the LIKE keyword, or full-text searching..