Search a Mysql Database
Moderator: General Moderators
-
Maluendaster
- Forum Contributor
- Posts: 124
- Joined: Fri Feb 25, 2005 1:14 pm
Search a Mysql Database
...
Last edited by Maluendaster on Sat Jan 21, 2006 9:21 pm, edited 1 time in total.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
You need to use the LIKE clause for the search I'll guess (depending upon your needs). You can use the MySQL function CONCAT() to build the hyperlink too 
Code: Select all
select
concat('<a href="', url, '">', name, '</a>') as hyperlink
from
tbl_name
where
name like '%$search_input%'- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact: