This is how generated code looks like, considering the Insert Transaction settings:
<?php
// Load the tNG classes
require_once('includes/tng/tNG.inc.php');
// Make an unified connection instance
$conn_test = new tNG_connection($test, $database_ test);
// Make a transaction dispatcher A dispatcher is a component of the Transaction Engine which contains all the transactions on a page and handles all interactions between that page and the transactions: executes the transactions, feeds the recordsets generated by the transactions to the page, displays the transaction's error messages, etc. instance
$tNGs = new tNG_dispatcher("");
// Make an insert transaction instance
$insertTNG1 = new tNG_insert($conn_test);
$tNGs->addTransaction($insertTNG1);
// Register triggers
$insertTNG1->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "MM_Insert");
$insertTNG1->registerTrigger("END", "Trigger_Default_Redirect", 99, "index.php");
// Add columns
$insertTNG1->setTable("departments_dep");
$insertTNG1->addColumn("id_dep", "NUMERIC_TYPE", "POST", "id", "1");
$insertTNG1->addColumn("name_dep", "STRING_TYPE", "POST", "name", "");
$insertTNG1->setPrimaryKey("id_dep", "NUMERIC_TYPE");
// Execute all the registered transactions
$tNGs->executeTransactions();
// Get the transaction recordset A recordset is the result of executing an SQL query A query is a SQL command that will extract information from the tables of a database. Essentially, a query is a request for information from your database.. It is composed of multiple rows, each row having multiple columns. The columns presented in the query result depend on the column list declared in the query (they can belong to different tables). The number of rows and their order depend on the query conditions (WHERE, GROUP BY, HAVING, ORDER). The recordset acts as a source of dynamic data The InterAKT Dynamic Data tool is a replacement for the standard dynamic data dialog. It is used in the MX Kollection 3, to provide a unified way of building mark-ups, or place holders. These are recordset fields, server or session variables, and other types of dynamic data that are replaced at runtime by their corresponding values in web applications.
$rsDepartments_dep = $tNGs->getRecordset("departments_dep");
$row_rsDepartments_dep = mysql_fetch_assoc($rsDepartments_dep );
$totalRows_rsDepartments_dep = mysql_num_rows($rsDepartments_dep );
For detailed information regarding the different code parts, read the Extended view on the generated code section.
Related Topics