|
Posted by DR on 07/08/07 06:53
Is it possible to search within concatenated fields in mySQL?
This query works fine:
SELECT CONCAT(title, description) AS searchInMe FROM content
But when I try searching within 'searchInMe' I get an unknown column
error. This is the (Dreamweaver generated) query:
$query_search = sprintf("SELECT CONCAT(title, description) AS
searchInMe FROM content WHERE searchInMe LIKE '%%%s%%'",
$searchTerm_search);
Is it that I cannot search within concatenated fields?
Many thanks,
Dmitri
Navigation:
[Reply to this message]
|