XoopsModelWrite::cleanVars |
( |
& |
$object | ) |
|
Clean values of all variables of the object for storage. also add slashes and quote string whereever needed
CleanVars only contains changed and cleaned variables Reference is used for PHP4 compliance
- Returns
- bool true if successful public
Definition at line 43 of file write.php.
References $errors, $vars, _DBDATESTRING, _DBTIMESTAMPSTRING, _DBTIMESTRING, _XOBJ_ERR_REQUIRED, _XOBJ_ERR_SHORTERTHAN, MyTextSanitizer\getInstance(), XOBJ_DTYPE_ARRAY, XOBJ_DTYPE_DATE, XOBJ_DTYPE_DECIMAL, XOBJ_DTYPE_EMAIL, XOBJ_DTYPE_FLOAT, XOBJ_DTYPE_INT, XOBJ_DTYPE_LTIME, XOBJ_DTYPE_MTIME, XOBJ_DTYPE_OTHER, XOBJ_DTYPE_SOURCE, XOBJ_DTYPE_STIME, XOBJ_DTYPE_TIME, XOBJ_DTYPE_TIMESTAMP, XOBJ_DTYPE_TXTAREA, XOBJ_DTYPE_TXTBOX, XOBJ_DTYPE_UNICODE_ARRAY, XOBJ_DTYPE_UNICODE_EMAIL, XOBJ_DTYPE_UNICODE_OTHER, XOBJ_DTYPE_UNICODE_TXTAREA, XOBJ_DTYPE_UNICODE_TXTBOX, XOBJ_DTYPE_UNICODE_URL, XOBJ_DTYPE_URL, and xoops_convert_encode().
XoopsModelWrite::delete |
( |
& |
$object, |
|
|
|
$force = false |
|
) |
| |
delete an object from the database
- Parameters
-
object | $object | XoopsObject reference to the object to delete |
bool | $force | |
- Returns
- bool FALSE if failed.
Definition at line 320 of file write.php.
References $i, $result, and $sql.
XoopsModelWrite::deleteAll |
( |
|
$criteria = null , |
|
|
|
$force = true , |
|
|
|
$asObject = false |
|
) |
| |
delete all objects matching the conditions
- Parameters
-
object | $criteria | CriteriaElement with conditions to meet |
bool | $force | force to delete |
bool | $asObject | delete in object way: instantiate all objects and delte one by one |
- Returns
- bool
Definition at line 345 of file write.php.
References $criteria, $num, and $sql.
XoopsModelWrite::insert |
( |
& |
$object, |
|
|
|
$force = true |
|
) |
| |
insert an object into the database
- Parameters
-
object | $object | XoopsObject reference to object |
bool | $force | flag to force the query execution despite security settings |
- Returns
- mixed object ID
Definition at line 272 of file write.php.
References $result, and $sql.
XoopsModelWrite::updateAll |
( |
|
$fieldname, |
|
|
|
$fieldvalue, |
|
|
|
$criteria = null , |
|
|
|
$force = false |
|
) |
| |
Change a field for objects with a certain criteria
- Parameters
-
string | $fieldname | Name of the field |
mixed | $fieldvalue | Value to write |
object | $criteria | CriteriaElement |
bool | $force | force to query |
- Returns
- bool
Definition at line 380 of file write.php.
References $criteria, $result, and $sql.
The documentation for this class was generated from the following file:
- L:/0xoops/xoops-2.5.6/htdocs/class/model/write.php