title: Not letting me create user codeigniter
body: <p>Currently I have a issue with my admin create in codeigniter. </p>
  
  <p>Not letting me create a user from my form. I have a sql syntax error. and not sure how to make sure to set user_id to 1 if first install.</p>
  
  <p><strong>Error</strong></p>
  
  <pre><code>Error Number: 1064
  
  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 'WHERE `username` = 'admin'' at line 2
  
  SELECT * WHERE `username` = 'admin'
  
  Filename: C:\xampp\htdocs\codeigniter-cms\system\database\DB_driver.php
  
  Line Number: 330
  </code></pre>
  
  <p><strong>On Model</strong></p>
  
  <pre><code>function adminuser() {
  $this-&gt;db-&gt;where('username', $this-&gt;input-&gt;post('username'));
  $query = $this-&gt;db-&gt;get($this-&gt;input-&gt;post('database'));
  
  if($query-&gt;num_rows &gt; 0){
  
  echo '&lt;div class="alert alert-error"&gt;&lt;a class="close" data-dismiss="alert"&gt;×&lt;/a&gt;&lt;strong&gt;';
  echo "Username already taken";  
  echo '&lt;/strong&gt;&lt;/div&gt;';
  
  }else{
  
  $query_user = array(
  'username' =&gt; $this-&gt;input-&gt;post('username'),
  'password' =&gt; sha1($this-&gt;input-&gt;post('password')),
  'email' =&gt; $this-&gt;input-&gt;post('email')
  );
  
  $insert = $this-&gt;db-&gt;insert($this-&gt;input-&gt;post('database'), $query_user);
  return $insert;
  }
  }
  </code></pre>