title: Mysql Query inside a php variable
body: <p>At my workplace, we were having problems with a certain field. From time to time we need to suspend someone from a mailing list, and to do that, we would just update their record to make the suspend field = Y. </p>
  
  <p>That works no problem in phpMyAdmin, but when we use the crud pages for the staff, sometimes it fails to update, leaving the value of Suspend = N. After looking at the code, I wanted to know if the following line could be the source of the problem. </p>
  
  <pre><code>$rs = mysql_query($sql, $conn) or die("Query has Failed : $sql");
  </code></pre>
  
  <p>Everything else before it looks good, and it is the last line in the script. Now, I would think that this shouldn't work, but it does. This will run the query. I would think that it would only work if it was </p>
  
  <pre><code>mysql_query($sql, $conn) or die("Query has Failed : $sql");
  </code></pre>
  
  <p>But it seems to work fine on most occasions. Only every now and then it doesn't work. Could this be the cause of the problem? One last bit of information, we are using MyIsam for the engine.</p>
  
  <p>I would appreciate any help you could give!</p>