-
Notifications
You must be signed in to change notification settings - Fork 0
ExportDB
Mehdi Bounya edited this page Jul 14, 2018
·
2 revisions
The \PHPForms\ExportDB()
class is used to export data to a database.
- Arguments:
-
PDO $pdo
: The PDO instance. -
string $table_name = null
: Table name. -
array $data = []
: Data to be exported. -
array $map = []
: A map for the data. Read more here
-
- Arguments:
-
string $name
: The field name -
string $value
: Field's value
-
Add data to be exported, if data exists with the same field name its value will be replaced.
- Arguments:
-
array $map
: Map to set
-
Add a map to the exporter, if a map already exists it will be overwritten. More on maps
- Arguments:
-
string $table
: Table name
-
Set the table name where to save the data.
- Returns: bool
Inserts the data into a database, return TRUE on success or FALSE otherwise. The data will be escaped automatically by PDO. Field names and the table name are escaped too and surrounded by backticks `.