Raga ho un problema con la classe in oggetto
devo importare un file .gz il cui nome viene passato tramite variabile id
sto sbattendo la testa con questo codicegrazie.... riprendo parte di codice anche dell'esempio...codice:...<?php //connessione al db// $id = $_GET['id']; $dbdump = &new MySQL_DumpDB(); $file = fopen($id,"r")or die("Impossibile aprire il file in lettura!"); $dump = $dbdump->set_dump($file,TRUE); // Check if dump is... if ($dump) { // ...Full echo "\n"; echo $dump; echo "------------------------------------------\n\n"; flush(); echo "Dump Done, importing it into TEST2\n"; // Try to reimport it into another DB, creating it if don't exists $res = $dbdump->import_dump("diocesi",FALSE,TRUE); // Check for errors if (is_array($res)) { // Errors founded echo "IMPORT FAILED!!!\n"; print_r($res); } else { // All ok echo "IMPORT DONE!!!\n"; } } else { // Dump Failed echo "Dump Failed\n"; } flush(); // Reset Settings $dbdump->config_reset(); echo "Settings Resetted\n"; ?>
questo e' l'errore...
1codice:---------------- ------------------------- - Dump Done, importing it into TEST2 IMPORT FAILED!!! Array ( [0] => Array ( [data] => 1131720242 [num] => 1 [query] => Resource id #6 [err_str] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Resource id #6' at line 1 [err_num] => 1064 ) ) Settings Resetted

Rispondi quotando
