I could not find any working examples of using the phpAjaxTags autocomplete with a mysql database (using legacy code).
Please provide working examples of an autocomplete that works with a mysql database.
I tried this, but it just doesn't work.
[code]
$glArray = array();
$sql = 'SELECT * FROM companies WHERE company_name LIKE "' . $name . '"%"';
$res = execute( $res );
while ($row = mysql_fetch_object($res)) {
array_push($gl_array, $row->address1);
} // wend
function cxmlByName($name){
global $glArray;
foreach($glArray as $k => $v){
foreach($v as $k2 => $v2){
//cho $k.'='.$v.' ';
if (strpos('_'.$v2,$name)>0)
echo '<item><name>'.$v2.'</name><value>'.$k.'</value></item>';
}
}
} // end function
[/code]
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I could not find any working examples of using the phpAjaxTags autocomplete with a mysql database (using legacy code).
Please provide working examples of an autocomplete that works with a mysql database.
I tried this, but it just doesn't work.
[code]
$glArray = array();
$sql = 'SELECT * FROM companies WHERE company_name LIKE "' . $name . '"%"';
$res = execute( $res );
while ($row = mysql_fetch_object($res)) {
array_push($gl_array, $row->address1);
} // wend
function cxmlByName($name){
global $glArray;
foreach($glArray as $k => $v){
foreach($v as $k2 => $v2){
//cho $k.'='.$v.' ';
if (strpos('_'.$v2,$name)>0)
echo '<item><name>'.$v2.'</name><value>'.$k.'</value></item>';
}
}
} // end function
[/code]
Well - from what I see - You have just a typo :)
$glArray = array();
array_push($gl_array ...
Sorry for the late answer - unfortunatelly I'm a busy person :(