joined:Feb 20, 2011
I have a lot of Mysql tables where up to 40% of some numeric fields are '0'
tables are set as UTF8
I am using the phpMyEdit system from playton and a typical NUM array for a field is produced by this type of code.
$opts['fdd']['other_no'] = array(
'default' => '',
'help|ACP' => 'Limit 4 digits',
'input' => '',
'maxlen' => 4,
'name' => 'GWR_#',
'options' => 'ACPVDFL',
'select' => 'T',
'size' => 4,
'sqlw' => 'TRIM("$val_as")',
'sort' => true
//$opts['fdd']['lner#'] ==0 ?'':$opts['fdd']['lner#'][' '];
The bottom line is my latest effort to schieve this but with no effect getting the php to replace the '0' with Null or " "
I felt this effort was getting close
Each table can contain up to 6 fields that require this change so I wonder if a single piece of code could work when ever a fiels held a "0"
I am not very good at this and I have been stumbling around with Server side stuff and Global variables all to no avail
So any help wouid be most appreaciated