title: PHP concatenate names and update SQL field
body: <p>Firstly, here is my code</p>
  
  <pre><code>$qry="SELECT * FROM Members WHERE member_id = '".$_SESSION['SESS_MEMBER_ID']."'";
  $result=mysql_query($qry);
  $check = mysql_fetch_assoc($result);
  
  if($check['fullname'] == 0) {
  $qry1 = "SELECT CONCAT( fname, ' ', lname ) AS firstlast FROM Members WHERE member_id = '".$_SESSION['SESS_MEMBER_ID']."'";
  $result1 = mysql_query($qry1);
  $qry2 = "UPDATE Members SET fullname = '$result1'"; }
  </code></pre>
  
  <p>I am trying to do the following:-</p>
  
  <ol>
  <li>Check if the 'fullname' field from the Members table is 0 (which is
  the default value) based on the member_id </li>
  <li>If it is, then concatenate the fname and lname fields into one
  string, with a space in between</li>
  <li>Take this concatenated string and place it back into the Members
  table in the 'fullname' field</li>
  </ol>