Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6369079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:45:25+00:00 2026-05-25T00:45:25+00:00

Interested in using the jQuery UI autocomplete feature to connect with a large MySQL

  • 0

Interested in using the jQuery UI autocomplete feature to connect with a large MySQL database of events. Will this slow down each page significantly?(Search bar will be on all pages)

Should I store the results from the Query to Local Storage put the script at the bottom of the page? Or SESSION or Cookie?

Here is the code without any cache features.

<?php

require_once("../../connect.php");
$day_events = "SELECT * FROM tbl_events";
$events_result = mysql_query($day_events);

?>

<script>
    $(function() {
    var availableTags = [
<?php

  while($event_row=mysql_fetch_array($events_result)) {
  echo "\"".$event_row['event']."\",\n";
  }

?>
    ];
    $( "#tags" ).autocomplete({
        source: availableTags
    });
});
</script>

**EDIT: To clarify my question is will using the autocomplete slow down pages significantly? If so what methods can be used to improve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:45:26+00:00Added an answer on May 25, 2026 at 12:45 am
    <script> 
    $().ready(function() {
    $('#tag').autocomplete('tag.php?find=tag', {
              width: 260,
              matchContains: true,
              selectFirst: false
            });
    });
    </script>
    
    <?php
    //in tag.php
    $find = $_GET["find"];
    if($find=='tag'){
        $q = strtolower($_GET["q"]);
        if (!$q) return;
        $sql = "select DISTINCT tag from tag where name_tag LIKE '%$q%'";
        $rsd = mysql_query($sql);
        while($rs = mysql_fetch_array($rsd)) {
            $cname = $rs['name_tag'];
            echo "$cname\n";
        }
    }
    ?>
    
    <input id='tag' type='text'>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Jquery UI and Autocomplete func.(Combobox) and I interested in this part. $(<button>&nbsp;</button>)
I am interested in building a stack overflow style tags input using jquery autocomplete.
I'm interested in using an Object-Relational Mapping package for an upcoming project. This project
I hope you can help me with this. I've been using jquery datepicker in
First of all I'm not interested of using some jquery plugin . I just
I'm interested in using JS events such as right\left arrow, space bar etc. Wondering
I am interested in using jQuery to create automatic pagination for content based on
Interested in building my own drag'n'drop file uploader using JQuery/AJAX/PHP. Basically I want a
I have this data coming from a REST method using jquery's getJSON method. [Date.UTC(2010,0,0,0,0,0,0),
I'm interested in using Functional MetaPost on Mac OS X: http://cryp.to/funcmp/ I'm looking for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.