title: mysql_query update is not working though i am not getting any mysql errors
body: <p>i just wrote an update query for mysql database. the problem is neither its showing any mysql error nor it is updating the row. my_sql_rows is always outputing false which means nothing has been updated in my tabe 
  the code is as follows </p>
  
  <pre><code>if(isset($_POST['update_subject']))
  {  
      $id  = $_POST['id'];
      $menu_name  = $_POST['menu_name'];
      $visible  = $_POST['visible'];
      $position  = $_POST['position'];
      $content  = $_POST['content'];
  
      mysql_query("UPDATE subjects SET menu_name ='$menu_name', visible = $visible, position = $position,
                      content =    '$content'  WHERE id =  $id ")
                       or die("updation of '$menu_name' in table subjects failed due to : " . mysql_error ());
      if(mysql_affected_rows == 1 ) {
          echo "Updation of '$menu_name' in table subjects is done successfully !!! ";
      } else {
          echo "something went wrong. updation process is halted.";
      }   
  }
  </code></pre>
  
  <p>its always returning me "something went wrong. updation process is halted " 
  i know mysql commands are outdated but still i want to learn. thanx !</p>