$query_2 = "SELECT * FROM cds_users ORDER BY cds_user_company ASC";
$result_2 = mysql_query ($query_2) or die ("query_2 failed to run");
$query_contact = "CONCAT(cds_firstname, cds_lastname) AS name
FROM cds_users";
Sure this is a simple question - but how can I conbine the two lines of code to a single query? The first code is pulling the entire record and the second I am trying to combine the lastname and firstname field into a single var to list.
the output I am assuming will be something like this..
<td align="left"><br><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
' . $row['cds_user_first'] . ', ' . $row['cds_user_last'] . '
</font>
</td>
I am looking for table output like this:
Company Contact
(cds_user_company) (cds_user_first + cds_user_last)
I think you use the CONCAT (cds_user_first, cds_user_last) AS name..
but can't seem to get the syntax right - but maybe I'm not even close...
Thanks in advance for the help. I've spent most of the day trying to figure this out and thought I would ask some of the experts!
Chris