title: mysql_real_escape_string not applying
body: <p>I have a form that takes in a number of fields about a camera's details.  This is a custom page I'm creating on Joomla.  First I get the database object:</p>
  
  <pre><code>$db = &amp;JFactory::getDBO();
  </code></pre>
  
  <p>Process the camera name entered in the form and add to DB:</p>
  
  <pre><code>$add_name = $_POST['camera_name'];
  $query_insert_camera = "INSERT INTO #__cameras (camera_name, ... , user_id) VALUES ('".mysql_real_escape_string($add_name)."', ... ,'".$user-&gt;id."')";
  $db-&gt;setQuery($query_insert_camera);
  $db-&gt;query();
  </code></pre>
  
  <p>I just get an empty string for camera name.  If I take out <code>mysql_real_escape_string</code> it works fine. I'm guessing <code>mysql_real_escape_string</code> doesn't like the way I'm establishing a connection...I think.</p>
  
  <p>Any ideas?</p>