I have a MySQL Database with a load of website member names as part of it. This DB is used to check members usernames and passwords when they sign-in.
What I am planning to do is insert <font color=#ff6600> before their username, and </font> after it... within the actual database.
Now, is it possible to search the usernames but ignore the two font tags?
I have to include the font tags in the database because the usernames get pulled from it all over the site, and over several sites.
Re-coding each and every page that displays usernames is not an option.
Is it possible... or should I cry?
Searching within a field.
Moderator: General Moderators
you might add the tag to your search, e.g.or select with a LIKE statement and check later stripping the tags.
But this is a dirty hack, so if someone asks; I didn't tell you
Code: Select all
$query = 'SELECT ... WHERE login='''.mysql_escape_string('<font color=#ff6600>'.$login.'</font>').'''';But this is a dirty hack, so if someone asks; I didn't tell you
