Loading...
 

DAL method: Add()

Inserts new record into the database.
Syntax
Add()
Arguments
No arguments.
Return value
No return value.
Example
Insert new record into the database:
PHP
global $dal;
$tblEvents = $dal->Table("EventsTable");
$tblEvents->Value["event"]="First event";
$tblEvents->Value["public"]="yes";
$tblEvents->Add();
ASP
dal.Table("EventsTable").Value("event")="First event"
dal.Table("EventsTable").Value("public")="yes"
dal.Table("EventsTable").Add()
The corresponding SQL query:
SQL
INSERT INTO EventsTable (event,public) VALUES ('First event','yes')

See also