ajaxCRUD.com
» a PHP class to create / read / update / delete from a database table using AJAX
by loud canvas mediaAjaxCRUD API Reference
|
<< Reference overview << Home Object: ajaxCRUDConstructorFunctions
Variables |
addValueOnInsertsets a value to a field on row insert
void addValueOnInsert( String fieldName, String value )
This function should be used when certain fields should be immediately populated with pre-defined data. A good use of this function is when your table has a "date created" field for an entity. This field can be automatically determined (by mySQL) and then set when adding the row.
Keep in mind: this function will overwrite any value input by the user for this field. Therefore it should always be used in conjuctiton with omitAddField so that an input box for the field does not even display when adding an entry. Details
Parameters
Example$tblDemo->addValueOnInsert("fldCreationDate", "NOW()");
See also |
"AjaxCRUD is wonderful."
~Peter Barone
