how to shorten and hasten response time to my queueing system html?

65 Views Asked by At

Hi everyone I am new to stack overflow and I needed help to shorten my code and the response time to my created html queueing system.

The thing I need to fix my queueing system:

  1. How to have multi query in one go in my code pages because the code below is too long.

  2. In the code I have uploaded are there any ways to shorten the code with removing some of my hidden content.

  3. Can anyone check if there are other ways to make my queueing system faster because it lags alot.

  4. my alarm in the display page is not playing please check if I am missing something.

Thank you very much to view on my code and help me shorten it. *sql database is in the #FILE section.. *by the way I am using xampp to use the program.

here is the file:https://drive.google.com/file/d/0B83JUE9Lc3VIMXJOVnpvcmJmdGc/view?usp=sharing

the problem with my query it is too long how to shorten it or how to use a syntax to query all of these:

 // sql to delete a record 1
$sql = "DELETE FROM ticket";
mysqli_query($con, $sql);

$sql2 = "DELETE FROM queue";
mysqli_query($con, $sql2);

$sql3 = "ALTER TABLE `queue` AUTO_INCREMENT=1";
mysqli_query($con, $sql3);

// sql to delete a record 2
$sql4 = "DELETE FROM ticket2";
mysqli_query($con, $sql4);

$sql5 = "DELETE FROM queue2";
mysqli_query($con, $sql5);

$sql6 = "ALTER TABLE `queue2` AUTO_INCREMENT=1";
mysqli_query($con, $sql6);

// sql to delete a record 3
$sql7 = "DELETE FROM ticket3";
mysqli_query($con, $sql7);

$sql8 = "DELETE FROM queue3";
mysqli_query($con, $sql8);

$sql9 = "ALTER TABLE `queue3` AUTO_INCREMENT=1";
mysqli_query($con, $sql9);

// sql to delete a counter
$sql10 = "DELETE FROM counter";
mysqli_query($con, $sql10);

$sql11 = "ALTER TABLE `counter` AUTO_INCREMENT=1";
mysqli_query($con, $sql11);

$sql12 = "INSERT INTO `counter`(`id`, `counternumber`, `counternumber2`, `count`) VALUES (null,1,1,0)";
mysqli_query($con, $sql12);

$sql13 = "INSERT INTO `counter`(`id`, `counternumber`, `counternumber2`, `count`) VALUES (null,1,2,0)";
mysqli_query($con, $sql13);

$sql14 = "INSERT INTO `counter`(`id`, `counternumber`, `counternumber2`, `count`) VALUES (null,1,3,0)";
mysqli_query($con, $sql14);

$sql15 = "INSERT INTO `counter`(`id`, `counternumber`, `counternumber2`, `count`) VALUES (null,2,1,0)";
mysqli_query($con, $sql15);

$sql16 = "INSERT INTO `counter`(`id`, `counternumber`, `counternumber2`, `count`) VALUES (null,2,2,0)";
mysqli_query($con, $sql16);

$sql17 = "INSERT INTO `counter`(`id`, `counternumber`, `counternumber2`, `count`) VALUES (null,2,3,0)";
mysqli_query($con, $sql17);

$sql18 = "INSERT INTO `counter`(`id`, `counternumber`, `counternumber2`, `count`) VALUES (null,3,1,0)";
mysqli_query($con, $sql18);

$sql19 = "INSERT INTO `counter`(`id`, `counternumber`, `counternumber2`, `count`) VALUES (null,3,2,0)";
mysqli_query($con, $sql19);

$sql20 = "INSERT INTO `counter`(`id`, `counternumber`, `counternumber2`, `count`) VALUES (null,3,3,0)";
mysqli_query($con, $sql20);
0

There are 0 best solutions below