Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jul 28, 2024
1 parent e0a52be commit 0fe7c92
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions install/mysqlRestore.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ function executeFile($filename) {
// Executar todas as linhas para criar as tabelas sem bloqueio
foreach ($lines as $line) {
// Skip it if it's a comment
if (substr($line, 0, 2) == '--' || $line == '')
if (substr($line, 0, 2) == '--' || trim($line) == '')
continue;

// Add this line to the current segment
$templine .= $line; // Usar .= para concatenar strings
$templine .= $line;
// If it has a semicolon at the end, it's the end of the query
if (substr(trim($line), -1, 1) == ';') {
if (substr(trim($line), -1) == ';') {
// Perform the query
if (!$global['mysqli']->query($templine)) {
echo ('sqlDAL::executeFile ' . $filename . ' Error performing query \'<strong>' . $templine . '\': ' . $global['mysqli']->error . '<br /><br />');
Expand Down Expand Up @@ -102,13 +102,13 @@ function executeFile($filename) {
// Executar todas as linhas novamente para inserir dados com tabelas bloqueadas
foreach ($lines as $line) {
// Skip it if it's a comment
if (substr($line, 0, 2) == '--' || $line == '')
if (substr($line, 0, 2) == '--' || trim($line) == '')
continue;

// Add this line to the current segment
$templine .= $line; // Usar .= para concatenar strings
$templine .= $line;
// If it has a semicolon at the end, it's the end of the query
if (substr(trim($line), -1, 1) == ';') {
if (substr(trim($line), -1) == ';') {
// Perform the query
if (!$global['mysqli']->query($templine)) {
echo ('sqlDAL::executeFile ' . $filename . ' Error performing query \'<strong>' . $templine . '\': ' . $global['mysqli']->error . '<br /><br />');
Expand Down

0 comments on commit 0fe7c92

Please sign in to comment.