LetoDMS Community Forum
DB dump creation doesn't dump any data - Printable Version

+- LetoDMS Community Forum (https://community.letodms.com)
+-- Forum: LetoDMS Support (https://community.letodms.com/forumdisplay.php?fid=4)
+--- Forum: Bugs/Errors (https://community.letodms.com/forumdisplay.php?fid=11)
+--- Thread: DB dump creation doesn't dump any data (/showthread.php?tid=521)



DB dump creation doesn't dump any data - georgius - 07-05-2012

Hi,

I tried to backup database in Admin-Tools -> Backup tools -> DB create dump, but it created SQL script with empty data (https://rapidshare.com/files/3692697571/1341498986.sql). I created path for this issue (https://rapidshare.com/files/3150571900/create_dump.patch), it solved my problem.


RE: DB dump creation doesn't dump any data - steinm - 07-05-2012

(07-05-2012, 08:29 PM)georgius Wrote: Hi,

I tried to backup database in Admin-Tools -> Backup tools -> DB create dump, but it created SQL script with empty data (https://rapidshare.com/files/3692697571/1341498986.sql). I created path for this issue (https://rapidshare.com/files/3150571900/create_dump.patch), it solved my problem.

Thanks for the patch. It's just a bit hard to read, because there are so many differences due to line endings. I suppose not the whole file has changed, so you could as well describe the difference in a forum article.

Uwe



RE: DB dump creation doesn't dump any data - georgius - 07-05-2012

Change is not so big, just whole cycle
Code:
for ($i=0;$i<(count($record)/2);$i++){
   if (is_numeric($record[$i])) $values .= $record[$i];
   else $values .= "'".$record[$i]."'";
            
   if ($i<(count($record)/2-1)) $values .= ",";
}
is replaced with
Code:
$i=0;
foreach ($record as $column) {
   if (is_numeric($column)) $values .= $column;
   else $values .= "'".$column."'";

   if ($i != (count($record) - 1)) $values .= ",";
   $i++;
}