title: PHP+MYSQL encoding, utf8_polish_ci
body: <p>Hello i have problem with encoding in my script. 
  My connect function looks like:</p>
  
  <pre><code>function connect()
  {
      $conn = mysql_connect('192.168.1.127', 'mason_frik', 'difficultpassword');
      if (!$conn) 
      {
          die('Nie można się połaczyć!');
      }
      mysql_query("SET NAMES 'utf8'; COLLATE='utf8_polish_ci';");
      mysql_query("SET character_set_client = 'utf8'");
      mysql_query("SET character_set_results = 'utf8'");
      mysql_query("SET character_set_connection = 'utf8'");
      mysql_select_db('mason_konkursy');
  }
  </code></pre>
  
  <p>In my database i'm using utf8_polish_ci everywhere.
  In my script i'm getting something from other page and i need to search it in my db like this:
  //this function is parsing other page and get innertext of SPAN.</p>
  
  <pre><code>$question = GetSpanData($FirstQuestion, "dnn_ctr1975_ViewContestsContestNew_dc_question_lblQuestion");
  
  
  
  $wyn = mysql_query('SELECT * FROM questions WHERE question="'.$question.'"'); 
  $wynik = mysql_fetch_array($wyn, MYSQL_ASSOC);
  </code></pre>
  
  <p>Result is bool(false).
  When i copy query to my phpmyadmin and paste to sql it is working, but from my script it didn't.
  Can You help me?</p>