Documentation

內容目录

上一个主题

< Class Phalcon\Db\Profiler\Item

下一个主题

Class Phalcon\Db\Reference >

本页

Class Phalcon\Db\RawValue

Source on GitHub

This class allows to insert/update raw data without quoting or formating. The next example shows how to use the MySQL now() function as a field value.

<?php

$subscriber = new Subscribers();
$subscriber->email = 'andres@phalconphp.com';
$subscriber->createdAt = new \Phalcon\Db\RawValue('now()');
$subscriber->save();

Methods

public getValue ()

Raw value without quoting or formating

public __toString ()

Raw value without quoting or formating

public __construct (unknown $value)

Phalcon\Db\RawValue constructor

Follow along: