private function buildSelectRegisterFragment($name)
    {
        $field = $this->getStorageDescriptor()->getField($name);

        switch ($field['data_type']) {
            case 'int':
                $part_if = "\$this->isValueNumeric('$name')";
                $part_where = "$name=%$name\\\$d";
                break;
            case 'float':
            case 'double':
                $part_if = "\$this->isValueNumeric('$name')";
                $part_where = "$name=%$name\\\$d";
                break;
            case 'varchar':
            case 'text':
            case 'longtext':
            case 'enum':
            case 'set':
            case 'tinytext':
                $part_if = "\$this->isValueString('$name')";
                $part_where = "$name='%$name\\\$s'";
                break;
            default:
                $part_if = null;
                $part_where = null;
        }

        return array($part_if, $part_where);
    }
private function buildSelectRegisterFragment($name)
    {
        $field = $this->getStorageDescriptor()->getField($name);

        switch ($field['data_type']) {
            case 'int':
                $part_if = "\$this->isValueNumeric('$name')";
                $part_where = "$name=%$name\\\$d";
                break;
            case 'float':
            case 'double':
                $part_if = "\$this->isValueNumeric('$name')";
                $part_where = "$name=%$name\\\$d";
                break;
            case 'varchar':
            case 'text':
            case 'longtext':
            case 'enum':
            case 'set':
            case 'tinytext':
                $part_if = "\$this->isValueString('$name')";
                $part_where = "$name='%$name\\\$s'";
                break;
            default:
                $part_if = null;
                $part_where = null;
        }

        return array($part_if, $part_where);
    }
private function buildSelectRegisterFragment ( $ name ) { $ field = $ this -> getStorageDescriptor ( ) -> getField ( $ name ) ; switch ( $ field [ 'data_type' ] ) { case 'int' : $ part_if = "\$this->isValueNumeric('$name')" ; $ part_where = "$name=%$name\\\$d" ; break ; case 'float' : case 'double' : $ part_if = "\$this->isValueNumeric('$name')" ; $ part_where = "$name=%$name\\\$d" ; break ; case 'varchar' : case 'text' : case 'longtext' : case 'enum' : case 'set' : case 'tinytext' : $ part_if = "\$this->isValueString('$name')" ; $ part_where = "$name='%$name\\\$s'" ; break ; default : $ part_if = null ; $ part_where = null ; } return array ( $ part_if , $ part_where ) ; }
Build a table key comparison to prepare the getSelectRegister method
@param string $name Field name
@return array Returns a list with two elements: the evaluator value in PHP and the where value in SQL
Build a table key comparison to prepare the getSelectRegister method