开发者

how to updated the keywords from database

hi i have stored 1000 keywords in my database . if i search any keyword(with in my database) my site title开发者_如何学运维 must come Like a AIRPORT NETWORKS this title i want . this is for search engine box. how can i do with sql queries i used that below query for displayed my site title.

$ConvertedResultArray = explode('<div id="resultsDiv">', $ConvertedResult);
$V1 = $ConvertedResultArray[0];
$V2 = $ConvertedResultArray[1];
$SponsoredContent = '';
if(strtolower($SearchQuery) == 'taxi')
{
$SponsoredContent = '<br />AIRPORTS<br />NETWORKS';
}
$ConvertedResult = "$V1$SponsoredContent$V2";

i have a only one table named keywords

if i entered that key "taxi" in search box That title comes infront of the page AIRPORTNETWORKS as like that if i entered in the whole 1000 words which it is stored in database it must be come .

how can i do that what sql query i have to use.is it possible. please help me if any one have an idea thanks in advance


I realise this not the answer, but here is something to get you started

SELECT * 
    FROM Keywords
    WHERE Name LIKE "%AIRPORT%"


You need to use AJAX for that. I guess you are speaking about auto complete. if is tat you are talking about do the following steps.
1. use the query given by PerformanceDBA
2. update the textbox value with the first row of query result by triggering textbox onkeyup() event.

If this is not what you want please rephrase your question so tat others can understand..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜