Page 1 of 1

Search a Mysql Database

Posted: Mon Dec 12, 2005 6:52 pm
by Maluendaster
...

Posted: Mon Dec 12, 2005 6:57 pm
by Chris Corbyn
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%'

Posted: Mon Dec 12, 2005 10:14 pm
by John Cartwright
Moved to Databases.