 <p>You can quite easily achieve this with a single query:</p> <pre><code>UPDATE `Members` SET `fullname` = CONCAT(`fname`, ' ', `lname`) WHERE `member_id` = '".$_SESSION['SESS_MEMBER_ID']."' AND `fullname` = 0 LIMIT 1; </code></pre>