title: alternative to mysql_real_escape_string (access_denied)
body: <p>Im using sphinxql currently and using mysql_real_escape_string on my $query but since there is no database connection...I get an access denied. I was looking for alternatives :</p>
  
  <pre><code>$query = $_GET["query"];
  
  
  
  $query = trim($query);
  $remove = array(',','}','{',']','[',';',':','&gt;','&lt;','|',')','(','*','%','$','!','^','/');
  $query=str_replace($remove, "", $query);
  $con = mysql_connect("localhost:9306","root","");
  if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }
  
  $res = mysql_query("SELECT * FROM test1 WHERE MATCH ('$query')");
  </code></pre>