insert_row_into_table_v


Description:

[ Version ( since = "4.2.3" ) ]
public bool insert_row_into_table_v (string table, SList<string> col_names, SList<Value?> values) throws Error

col_names and values must have length (&gt;= 1).

This is a convenience function, which creates an INSERT statement and executes it using the values provided. It internally relies on variables which makes it immune to SQL injection problems.

The equivalent SQL command is: INSERT INTO &lt;table&gt; (&lt;column_name&gt; [,...]) VALUES (&lt;column_name&gt; = &lt;new_value&gt; [,...]).

Parameters:

this

an opened connection

table

table's name to insert into

col_names

a list of column names (as const gchar *)

values

a list of values (as Value)

Returns:

TRUE if no error occurred, FALSE otherwise