Subclass of tgcSqlBuilder that helps to create INSERT sql-statements.
Subclass of tgcSqlBuilder that helps to create INSERT sql-statements.
Located in /tgcSqlBuilder/Insert.php (line 31)
tgcSqlBuilder | --tgcSqlBuilder_Insert
Constructor
Constructor
Add a value to insert.
Add a value to insert. There are two ways of calling this method:
1 // simple method-call
2 $sql = new tgcSqlBuilder_Insert($dbc);
3 $sql->addInsert('col_Username', 'superman');
4
5 // complex method-call, you can add more than one insert with only one method-call
6 $insert = array (
7 'col_Username' => 'superman',
8 'col_Email' => 'superman@superheroes.com'
9 );
10 $sql->addInsert($insert);
Add a raw INSERT statement
Add a raw INSERT statement There are two ways of calling this method:
1 // simple method-call
2 $sql = new tgcSqlBuilder_Insert($dbc);
3 $sql->addInsert('creationTime', 'NOW()');
4
5 // complex method-call, you can add more than one insert with only one method-call
6 $insert = array (
7 'created' => 'NOW()',
8 'changed' => 'NOW()'
9 );
10 $sql->addInsert($insert);
Add the statements table.
Add the statements table. If you call this method twice, the tablename that was set in first call will be overwritten.
1 $sql = new tgcSqlBuilder_Select($dbc);
2 $sql->addTable('users');
3
Generate the sql-statement.
Generate the sql-statement. This method generates a query based on the object-information and returns it as a string.
1 $sql = new tgcSqlBuilder_Insert($dbc);
2 $query = $sql->generateQuery();
Remove one or all insert columns.
Remove one or all insert columns. If you specify a columnname, then just this column's insert will be removed, else all inserts will be removed.
Remove one or all insert columns.
Remove one or all insert columns. If you specify a columnname, then just this column's insert will be removed, else all inserts will be removed.
Remove the tablename.
Remove the tablename.
Reset the object's whole information.
Reset the object's whole information.
Inherited From tgcSqlBuilder
tgcSqlBuilder::tgcSqlBuilder()
tgcSqlBuilder::addTable()
tgcSqlBuilder::escape()
tgcSqlBuilder::generateQuery()
tgcSqlBuilder::removeTable()
tgcSqlBuilder::reset()
Documentation generated on Fri, 19 Nov 2004 23:54:03 +0100 by phpDocumentor 1.2.3