Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72618

How to fix this error have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version [duplicate]

$
0
0
PHP code:

    <?php


$con = mysqli_connect('localhost','root','','halcondentalclinic');



$sql =  mysqli_query($con,"INSERT INTO expiredapp SELECT * FROM bookings WHERE dates <= CURDATE()");



            if ($con->query($sql) === TRUE) {
               $a=mysqli_query($con,"DELETE FROM  bookings WHERE dates <= CURDATE()");
                if ($con->query($a) === TRUE) {
                    header('Location:appointment_calendar.php');

                } else {
                    echo "Error: " . $a . "<br>" . $con->error;
                }
            } else {
                echo "Error: " . $sql . "<br>" . $con->error;
            }




?>

Hi, guys How to fix this kind of error : enter image description here

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

The error is in the image above:


Viewing all articles
Browse latest Browse all 72618

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>