Hi .

Sorry , i don't see that jquery it's most than one script.

So i use : Autocomplete Plugin .
All field use local file as a base, a static base

I want to use a sql base to have a dynamic one

I made my own mod , but , it's basic cause it's not really my part .

It's replace the search.php

<?php

$q = strtolower($_GET["q"]);
if (!$q) return;

  $cnx = mysql_connect(localhost,login,password) ;
  $db  = mysql_select_db(dabase) ;


$items = array();
$sql = "SELECT numero, modele FROM materiel";
$req = mysql_query($sql);
while($data = mysql_fetch_array($req))
{
$numero = $data['numero'];
$modele = $data['modele'];
$items[$numero] = $modele;
}


foreach ($items as $key=>$value) {
        if (strpos(strtolower($key), $q) !== false) {
                echo "$key|$value\n";
        }
}

?>

In fact as , as the original script use an array , i echo an array
from my base .
This one works .. but it's not really a proper code .

Cause i just want 1 field , not an array .

But i don't know how to edit the code to just have a 1 collum list .

Then , as i succes to filled 2 field with the array , why not , filled
more than 2 ..
But it's not more an array , and i don't know how to use a table ..

I search the group but don't find an answer .

With those 2 mods , i think that autocomplete plugin will be really
great .

Thanks

On 6 juil, 20:06, Rey Bango <[EMAIL PROTECTED]> wrote:
> Which script are you referring to?
>
> Rey...
>
>
>
> DigiCelebs wrote:
> > Anyone ?? please
>
> > On Jul 4, 10:34 am, DigiCelebs <[EMAIL PROTECTED]> wrote:
> >> Hi ..
>
> >> I found your jquery script and it's great cause it's the first that i
> >> found with multiplie field.
>
> >> But you don't take list from a database ( sql ) , only from file.
> >> Is it possible to have a field that take the list from a sql
> >> database ??
>
> >> Thanks
>
> > __________ Information from ESET NOD32 Antivirus, version of virus 
> > signature database 3244 (20080705) __________
>
> > The message was checked by ESET NOD32 Antivirus.
>
> >http://www.eset.com- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

Reply via email to