Hi,
I am using a jquery auto-complete and need to convert this PHP code block to Coldfusion so it works in my application:
$suggestions = "";
$data = "";
$query = "SELECT id, name FROM clients WHERE name LIKE '%".$_REQUEST['query']."%' ";
$cliente = mysql_query($query);
while($linha = mysql_fetch_array($cliente)) {
$suggestions .= "'".nl2br($linha['name'])."', ";
$data .= "'".nl2br($linha['id'])."', ";
}
echo "{ query:'".$_REQUEST['query']."',suggestions:[".substr($suggestions,0,-2)."],data:[".substr($data,0,-2)."] }";
The auto-complete is here:
[login to view URL]
I will supply my SQL query (which I need a little help with too) once this task is assigned.
I need this task done now - well in the next couple hours - so don't bid if you're going to bed!
Thanks,
jo