@@ -903,11 +903,7 @@ public function join($joinTable, $joinCondition, $joinType = '')
903
903
* @author Jonas Barascu (Noneatme)
904
904
* @param string $importTable The database table where the data will be imported into.
905
905
* @param string $importFile The file to be imported. Please use double backslashes \\ and make sure you
906
- * use an absolute path.
907
- * @param string $terminateCharField The char which will be used to separate the data in a row.
908
- * @param string $terminateCharLine The char which marks the EOL. (PHP_EOL is also possible)
909
- * @param string $ignoreLines The ammount of lines to ignore. Useful if your #0 row marks the data structure.
910
- *
906
+ * @param string $importSettings An Array defining the import settings as described in the README.md
911
907
* @return boolean
912
908
*/
913
909
public function loadData ($ importTable , $ importFile , $ importSettings =
@@ -987,8 +983,10 @@ public function loadData($importTable, $importFile, $importSettings =
987
983
* Check out the LOAD XML syntax for your MySQL server.
988
984
*
989
985
* @author Jonas Barascu
990
- * @param string $importTable The table in which the data will be imported to.
991
- * @param string $importFile The file which contains the .XML data.
986
+ * @param string $importTable The table in which the data will be imported to.
987
+ * @param string $importFile The file which contains the .XML data.
988
+ * @param string $importSettings An Array defining the import settings as described in the README.md
989
+ *
992
990
* @return boolean Returns true if the import succeeded, false if it failed.
993
991
*/
994
992
public function loadXML ($ importTable , $ importFile , $ importSettings = Array ("linesToIgnore " => 0 ))
@@ -1003,7 +1001,6 @@ public function loadXML($importTable, $importFile, $importSettings = Array("line
1003
1001
1004
1002
// Check the import settings
1005
1003
if (gettype ($ importSettings ) == "array " ) {
1006
-
1007
1004
if (isset ($ importSettings ["linesToIgnore " ])) {
1008
1005
$ ignoreLines = $ importSettings ["linesToIgnore " ];
1009
1006
}
@@ -1018,7 +1015,6 @@ public function loadXML($importTable, $importFile, $importSettings = Array("line
1018
1015
// Build SQL Syntax
1019
1016
$ sqlSyntax = sprintf ('LOAD XML INFILE \'%s \' INTO TABLE %s ' ,
1020
1017
$ importFile , $ table );
1021
-
1022
1018
// FIELDS
1023
1019
if (isset ($ importSettings ["rowTag " ])) {
1024
1020
$ sqlSyntax .= sprintf (' ROWS IDENTIFIED BY \'%s \'' , $ importSettings ["rowTag " ]);
@@ -1158,11 +1154,10 @@ public function lock($table)
1158
1154
}
1159
1155
}
1160
1156
}
1161
- else
1162
- {
1157
+ else {
1163
1158
// Build the table prefix
1164
1159
$ table = self ::$ prefix . $ table ;
1165
-
1160
+
1166
1161
// Build the query
1167
1162
$ this ->_query = "LOCK TABLES " .$ table ." " .$ this ->_tableLockMethod ;
1168
1163
}
0 commit comments