public function buildFieldReplacement(array $field_descriptor, $alias = false)
    {
        if ($alias === false) {
            $alias = $field_descriptor['name'];
        }

        switch ($field_descriptor['data_type']) {
            case 'int':
                $retval = "%d$alias\$d";
                break;
            case 'float':
            case 'double':
                $retval = "%F$alias\$d";
                break;
            case 'varchar':
            case 'text':
            case 'longtext':
            case 'enum':
            case 'set':
            case 'tinytext':
                $retval = "'%s$alias\$s'";
                break;
            default:
                $retval = false;
        }

        return $retval;
    }
public function buildFieldReplacement(array $field_descriptor, $alias = false)
    {
        if ($alias === false) {
            $alias = $field_descriptor['name'];
        }

        switch ($field_descriptor['data_type']) {
            case 'int':
                $retval = "%d$alias\$d";
                break;
            case 'float':
            case 'double':
                $retval = "%F$alias\$d";
                break;
            case 'varchar':
            case 'text':
            case 'longtext':
            case 'enum':
            case 'set':
            case 'tinytext':
                $retval = "'%s$alias\$s'";
                break;
            default:
                $retval = false;
        }

        return $retval;
    }
public function buildFieldReplacement ( array $ field_descriptor , $ alias = false ) { if ( $ alias === false ) { $ alias = $ field_descriptor [ 'name' ] ; } switch ( $ field_descriptor [ 'data_type' ] ) { case 'int' : $ retval = "%d$alias\$d" ; break ; case 'float' : case 'double' : $ retval = "%F$alias\$d" ; break ; case 'varchar' : case 'text' : case 'longtext' : case 'enum' : case 'set' : case 'tinytext' : $ retval = "'%s$alias\$s'" ; break ; default : $ retval = false ; } return $ retval ; }
Builds a well formed replacement string for a field value.
@param array $field_descriptor Field descriptor to build the replacement string.
@param string $alias Alternate name used to map the value in the replacement string.
@return string Returns a well formed replacement string of false if no valid descriptor data_type found in
field descriptor.
Builds a well formed replacement string for a field value .