Forum Moderators: coopster
Is someone able to tell me how I can simply select a single value from a table and conactenate this with some text?
I can write the sql etc...I just need to know how to wite the echo statement that outputs a queried vale joined to some text.
Many thanks
that's pretty simple
for example
$sQuery="select * from user";
$sResult=mysql_query($sQuery) or die (mysql_error());
$sRecordSet=mysql_fetch_assoc($sResult);
$id=$sRecordSet['id'];
you can then output $id in any way u want and there are many possible ways for contatination. for example
echo "UserID of the Current User is: ".$id;
another is
echo "UserID of the Current User is: $id";
i guess it's clear. if not? let us know.