the original code:
Code: Select all
<?php global $database,$my; $query = "SELECT cb_roepnaam FROM #__comprofiler WHERE id = ". $my->id;
$database->setQuery( $query ); $fieldvalue = $database->loadResult(); return $fieldvalue;?>
What I want to do now is to make the same call, but, call 4 fields and add a carriage return after the first three so they showone below the other. (this is to create an address) the fields are: cb_street, cb_postalc, cb_town and cb_country. How do I do that?
the other thing I'm trying is this:
to calculate an age (at a future date) using the cb_birthdate field
the query would probably look like this:
Code: Select all
<?php global $database,$my; $query = "SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS('13-6-2008') - TO_DAYS(cb_birthdate)), '%Y') + 0 AS Age FROM FROM #__comprofiler WHERE id = ". $my->id;
$database->setQuery( $query ); $fieldvalue = $database->loadResult(); return $fieldvalue;?>
Thanks in advance!!