Jump to content

sql search DB query


crazyglue71

Recommended Posts

i'm trying to implement an autosuggest script into my site

 

there is a demo file included with a bunch of suggestions.. how can i change this to make the script look in the database instead.

 

#@ Do search
/*
$sql = 'SELECT VenuName FROM Profiles LIKE "%'.$search_engine['options']['input'].'%" 
	ORDER BY Profiles.VenuName 
	LIMIT 0, '.$search_engine['options']['search_limit'] ;
_dumpLog("Search : query =>\n $sql \n", 0) ;
$db->query($sql) ;
*/

#@ For example, simule return sql request
$country_list = '"Sort Order","Common Name","Formal Name","Type","Sub Type","Sovereignty","Capital","ISO 4217 Currency Code","ISO 4217 Currency Name","ITU-T Telephone Code","ISO 3166-1 2 Letter Code","ISO 3166-1 3 Letter Code","ISO 3166-1 Number","IANA Country Code TLD"
"1","Afghanistan","Islamic State of Afghanistan","Independent State",,,"Kabul","AFN","Afghani","+93","AF","AFG","004",".af"
"2","Albania","Republic of Albania","Independent State",,,"Tirana","ALL","Lek","+355","AL","ALB","008",".al"

 

above is the sample script.. i want to put the results of the query into the $country_list and remove all of the sample data, can someone please help me out with this..

 

Link to comment
https://forums.phpfreaks.com/topic/165992-sql-search-db-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.