title: php mysql single record show
body: <p>Sorry about the stupid question however I can't see/ not good enough to solve this:</p>
  
  <p>I have a MYSQL db and a php form everything works but I can't get out only one record - probably syntax error:</p>
  
  <pre><code>    $SQL = "SELECT * FROM massfelh WHERE user = $uname AND pass = md5($pword)"; - this is working
      $result = mysql_query($SQL); - this is too
      $catg = $result['categ']; - help
      $num_rows = mysql_num_rows($result); - this is ok too
      echo $catg; - for test and I can't print it on screen
  </code></pre>
  
  <p>DB structure: id, user, pass, categ</p>
  
  <p>I only need the categ (either 1 or 0) but it just won't show on screen.</p>
  
  <p>Any help would be appreciated - and please say I am stupid too:)</p>
  
  <p>Update:</p>
  
  <p>thank you for everyone of you!!!!!!! Helped me a lot. I have fount the best solution for my code however all the reply was correct. Thanks again hop this will help to some one how is just as beginner as me:) thank you again</p>