Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » NULL string
NULL string [message #311] Thu, 19 October 2006 03:15 Go to previous message
galdiolom is currently offline  galdiolom
Messages: 3
Registered: October 2006
Location: Padova ITALIA
Junior Member
Hi Mr. Marston,
these are two "stupid" questions for a professional programmer but, for an end-user like me (that like your works and applied it to a 'database' [ex Microsoft Access] to archiving my music library) are a little bit confusing:

1. I have a situation where, in some cases, last_name can be NULL so, when I'm trying to execute an $sql_select that have:
CONCAT(first_name, " ",last_name)
the result (obviously) is NULL.
Can I (and how) implement the control for this situation. I think the better place is in <table>.class.inc with _cm_formatData :

function _cm_formatData ($fieldarray)
// perform custom formatting before values are shown to the user.
{
if (!isset($fieldarray['person_name'])) {
// merge first_name and last_name into person_name
if (isset($fieldarray['first_name']) AND isset($fieldarray['last_name'])) {
$fieldarray['person_name'] = $fieldarray['first_name']
. ' '
. $fieldarray['last_name'];
} // if
} // if

return $fieldarray;

} // _cm_formatData


2. Is it possible with filepicker to access <subdirectories> of the <main> (picture) in you example?

Thank you in advance
Maurizio Galdiolo
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Display field from related table
Next Topic: Convert XMI to PHP
Goto Forum:
  


Current Time: Sat Nov 23 13:59:12 EST 2024

Total time taken to generate the page: 0.03466 seconds