Class WPDA_Import_File
Loads the content of an import file and imports it.
author | Peter Schulz |
---|---|
since | 1.0.0 |
package | WPDataAccess\Utilities |
__construct(string $file_path)
Create file pointer.
since | 1.0.0 |
---|
string
Full path of script (import) file.
__destruct()
since | 2.0.12 |
---|
import(string $schema_name, string $table_name, string $hide_errors)
Import method writes the content of the import file to the database. Security checks:
Since wpdb-query() only processes one query at a time we only need to check the type of statement at the beginning of the script ($file_content).
This method only return -1 if a failure occurs or the number of rows inserted. The number of probable error cause is to huge and complex to check all possibilities. Exports created from the WP Data Access table list should normally import without problems. For manually created imports responsibility is with the developer.
since | 1.0.0 |
---|
string
Schema in which this import allowes inserts.
string
Table in which this import allowes inserts.
string
ON = hide errors, OFF = show errors.
$file_content : string
$file_pointer : string