Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
MySQL Partial Search
Name: RTAdams89 Date: May 20, 2008 at 02:38:35 Pacific OS: na CPU/Ram: na Product: na
Comment:
I have a MySQL table which contains a column with names in it. I am using the following to search for and return any rows with the name entered into a html form on my site. This works fine as long as the exact name is entered into the form.
mysql_query("SELECT * FROM invoices WHERE name='" . $_POST["name"] . "'")
However, I would like to be able to return results that are partial matches. For example, if one of the names in the MySQL table is "Joe's Auto Shop", I would like to have that row returned even if only "Joe" is entered into the html form. Can this be down easily?
Summary: there are tons of mysql gui front ends. Some are free.. some are not. google search em. i like SQLyog. phpadmin is nice for a web based tool. ...
Summary: Hi FishMonger, Thanks for the links. I have to admit I am not the most experienced with databases and have only recently started PHP web development linked to MySQL databases due to a change in jobs. ...
Summary: You don't indicate if the urls you are seeking are explicit website addresses or fragments of html etc. If there are multiple urls within a given record, you will have to parse (search, edit/extract)...