title: Storing rand() output to mysql database ERROR
body: <p>I wanted to store the output of rand() function into my database, I have been getting the error! </p>
  
  <blockquote>
    <p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'unique) VALUES('964350')' at line 1 </p>
  </blockquote>
  
  <p>This is my code</p>
  
  <pre><code>&lt;?php
  
  require_once('connect.php');
  
      $unique = rand(100000, 999999);
  
      $uni = "INSERT INTO registrations (unique) VALUES('$unique')";
      $result = @mysql_query($uni);
  
          if($result) {
              $sucmsg_arr[] = 'Registration Successful!';
      }
  
  ?&gt;
  </code></pre>