Q:

How to concatenate and store MYSQL column values?

How do i concatenate a number of SQL columns and store the result in a result column? I am presently testing it using the following code:
***TEST.PHP***
<?php
include 'core/init.php';

$result = mysql_query('SELECT concat(q1, q2) as result FROM assessment WHERE assessmentid = 32');
while ($row = mysql_fetch_assoc($result)){
 echo $row['result'];
  }

?>                  

In my assessment table, I have the following columns:
assessmentid | q1 | q2 | result
In q1, there is the value of 3 in q1, and 5 in q2 therefore 35 is being echo'ed. I'm unsure on how I can add this result to my database table.

A:

assessmentid | q1 | q2 | result

UPDATE assessment set `result` = CONCAT(`q1`, `q2`) where condition

