コード例 #1
0
 /**
  * (non-PHPdoc)
  * @see core/model/fieldtypes/DBField#prepValueForDB($value)
  */
 function prepValueForDB($value)
 {
     if (!$this->nullifyEmpty && $value === '') {
         return DB::getConn()->prepStringForDB($value);
     } else {
         return parent::prepValueForDB($value);
     }
 }
コード例 #2
0
 /**
  * (non-PHPdoc)
  * @see core/model/fieldtypes/DBField#prepValueForDB($value)
  */
 function prepValueForDB($value)
 {
     if (!$this->nullifyEmpty && $value === '') {
         return "'" . Convert::raw2sql($value) . "'";
     } else {
         return parent::prepValueForDB($value);
     }
 }
コード例 #3
0
 public function prepValueForDB($value)
 {
     if (!$this->nullifyEmpty && $value === '') {
         return $value;
     } else {
         return parent::prepValueForDB($value);
     }
 }
コード例 #4
0
 /**
  * (non-PHPdoc)
  * @see core/model/fieldtypes/DBField#prepValueForDB($value)
  */
 function prepValueForDB($value)
 {
     if (!$this->nullifyEmpty && $value === '') {
         return "'" . Convert::raw2sql($value) . "'";
     } else {
         if ($value instanceof MultiValueField) {
             $value = $value->getValue();
         }
         if (is_object($value) || is_array($value)) {
             $value = serialize($value);
         }
         return parent::prepValueForDB($value);
     }
 }