Jump to content

guidonts

Members
  • Posts

    6
  • Joined

  • Last visited

About guidonts

  • Birthday 02/24/1956

Profile Information

  • Interests
    speleology

guidonts's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I have add "LIMIT 30" in my query and now it is what I want Thank you all
  2. it is faster with the fields by name in stead of * but it is still about 10-15 seconds
  3. I need to select all the fields from the table. There are just name, firstname and patientnumber Is it better to specify the fields in stead of *?
  4. I have changed it to an input field with this code this is the input field: <input name="tag" type="text" id="tag" size="60"/> this is the script <script> $(document).ready(function(){ $("#tag").autocomplete("autocomplete.php", { selectFirst: true }); }); </script> the autocomplete;php : $q=$_GET['q']; $my_data=mysqli_real_escape_string($conn,$q); //$mysqli=mysqli_connect('localhost','root','','autofield') or die("Database Error"); $sql="SELECT * FROM Patienten WHERE PATNR LIKE '$my_data%'"; $result = mysqli_query($conn,$sql) or die(mysqli_error()); if($result) { while($row=mysqli_fetch_array($result)) { $naam=STR_PAD($row['PATNAAM'],20,".",STR_PAD_RIGHT); $voornaam=STR_PAD($row['PATVNAAM'],20,".",STR_PAD_RIGHT); echo $row['PATNR']."....".$naam.$voornaam."n"; $_SESSION["NAAM"]=$naam; $_SESSION["PATNR"]=$row['PATNR']; } } ?> this fills my inputfield in about 15 seconds; but it is still too slow Guido
  5. I'm not using javascript, because I don't know how to do it. this is the code I use $sql="SELECT * FROM Patienten WHERE PATNR LIKE '$my_data%'"; $result = mysqli_query($conn,$sql) or die(mysqli_error()); if($result) { while($row=mysqli_fetch_array($result)) { $naam=STR_PAD($row['PATNAAM'],20,".",STR_PAD_RIGHT); $voornaam=STR_PAD($row['PATVNAAM'],20,".",STR_PAD_RIGHT); echo $row['PATNR']."....".$naam.$voornaam."n"; $_SESSION["NAAM"]=$naam; $_SESSION["PATNR"]=$row['PATNR']; } } $my_data = the input in the field
  6. Hello everyone I'm trying to fill in a combobox with a large amount of data (from a table containing about 100 000 names of patients). I can fill the box but it takes about 20 seconds before I can see the first items. Is there a way to do it very fast? I was using Micrsoft Access and there it is no problem to see all the names at once. Thank you very much. Guido
×
×
  • Create New...