0

This is my Mysql query:

mysql_select_db($database_final, $final);
$query_Truck = "SELECT * FROM tbl_truck";
$Truck = mysql_query($query_Truck, $final) or die(mysql_error());
$row_Truck = mysql_fetch_assoc($Truck);
$totalRows_Truck = mysql_num_rows($Truck);

how can i get the data inside this to be in the jquery autocomplete with the id of the truck plate number being the one stored in the database and not the truck plate number itself?

3
  • use jquery ui autocomplete jqueryui.com/autocomplete Commented Dec 1, 2013 at 5:10
  • You are looking for the autocomplete functionality, you are better off googling for: php jquery autocomplete mysql Commented Dec 1, 2013 at 5:10
  • Select2 is a library for providing all sorts of useful select widgets. The AJAX version might be of particular interest: ivaynberg.github.io/select2/#ajax Commented Dec 1, 2013 at 5:11

1 Answer 1

1

You could play around with jQuery's autocomplete. There are great examples on that site, and the API is on this page.

Or, shameless plug, you can check out a random implementation of autocomplete on my own website, at www.classbooklist.org

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.