Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

vozue

Error desconhecido SQL

Recommended Posts

Olá, segue o pequeno código:

<html>
<head>
<title>Minha pagina</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php

set_time_limit(0);

function lista_dir($_dir, $_nivel = 0)

{

 if (!is_dir($_dir)) {

  return FALSE;

 }

 $_od = getcwd();

 chdir($_dir);

 $_d = @opendir("./");

 while (($_1 = readdir($_d)) !== FALSE) {

  if (substr($_1, 0, 1) == "." AND strlen($_1) <= 2) {

   continue;

  }

  if (is_dir($_1)) {

   lista_dir($_1, $_nivel + 1);

  } else {

   $_con = @mysql_connect("localhost", "root", "");

   if ($_con === FALSE) {

    echo "Não foi possível conectar ao MySql" . mysql_error();

    exit;

   }

   mysql_select_db("capazs", $_con);

   if ($_con === FALSE) {

    echo "Não foi possível conectar ao db" . mysql_error();

    exit;

   }

   $path      = getcwd();

   $md5       = md5_file($_1);

   $extension = pathinfo($_1);

   $extension = $extension['extension'];

   $_sql      = "INSERT INTO files VALUES (NULL, '$md5')";

   $_sql      = "INSERT INTO drive_google (fileMd5, fileName, fileExtension, fileDir) VALUES ('$md5','$_1','$extension', '$path')";

   $_res      = mysql_query($_sql, $_con);

   if ($_res === FALSE) {

    echo "Erro na inclusão dos registros >>>" . mysql_error() . "<br>";

   } else {

   }

  }

 }

 closedir($_d);

 chdir($_od);

}

lista_dir('C:\Users\Daniel Carloni\Desktop\11.752.119.397');

?>

</body>
</meta>
</html>

Segue o erro:

Erro na inclusÒo dos registros >>>You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'eeze')' at line 1

O que pode ser?

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.