Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.