title: How to avoid or neglect the retrieving image while inserting into the phpmyadmin in php
body: <p>I am new to php and I am getting an error:</p>
  
  <blockquote>
    <p>Could not retrieve image: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax </p>
  </blockquote>
  
  <p>but I don't want to retrieve the image, I want to avoid it. So, how to resolve this?  </p>
  
  <pre><code>if(!isset($_SESSION["username"])) {
      header("location:index.php");
  }
  
  if(!empty($_SESSION['uid'])) {
      $uidval = $_SESSION['uid'];
  }
  
  $uidval="";
  
  if((isset($_GET['user_avatar'])) &amp;&amp; (!empty($_GET['user_avatar']))) {
      $user_avatar = $_GET['user_avatar'];    
  }
  
  $getImage = mysqli_query($db, "SELECT user_avatar FROM user WHERE uid=" . $uidval) or die("Could not retrieve image: " .mysqli_error($db));
  
  $path=mysqli_fetch_assoc($getImage) or die("Could not fetch array : " .mysqli_error($db));
  </code></pre>