Ir para conteúdo

POWERED BY:

Arquivado

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

dgateles

Erro ao importar sql

Recommended Posts

Amigos, estou com um problema na hora de importar um arquivo sql para minha DB.

 

V4fjh90.png

 

Acho que o código está obsoleto, mas eu não entendo de MySQL e não sei reparar. Se puderem me ajudar, eu agradeço.

-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 09, 2014 at 08:52 AM
-- Server version: 5.5.16
-- PHP Version: 5.3.8

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `pl`
--

-- --------------------------------------------------------

--
-- Table structure for table `accesslogs`
--

CREATE TABLE IF NOT EXISTS `accesslogs` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `urlid` int(10) NOT NULL,
  `status` char(1) COLLATE utf8_unicode_ci NOT NULL,
  `ipaddress` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `referer` varchar(300) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=324 ;

--
-- Dumping data for table `accesslogs`
--

INSERT INTO `accesslogs` (`id`, `time`, `urlid`, `status`, `ipaddress`, `referer`) VALUES
(322, '2014-05-29 06:51:54', 63, 'd', '127.0.0.1', 'Direct'),
(321, '2014-05-29 06:09:35', 58, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/download.php?downcode=j1b4i0f1t2s8c7l6n5t4'),
(320, '2014-05-29 06:09:29', 61, 'f', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/index.php'),
(311, '2014-05-29 05:51:15', 63, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/index.php'),
(308, '2014-05-29 04:33:24', 61, 'f', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/linkprofile.php?urlid=61'),
(307, '2014-05-29 04:33:04', 61, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/linkprofile.php?urlid=61'),
(306, '2014-05-29 04:32:30', 61, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/linkprofile.php?urlid=61'),
(305, '2014-05-29 04:31:50', 61, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/linkprofile.php?urlid=61'),
(304, '2014-05-29 04:31:14', 61, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/linkprofile.php?urlid=61'),
(303, '2014-05-29 04:28:40', 61, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/linkprofile.php?urlid=61'),
(302, '2014-05-29 04:28:16', 61, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/linkprofile.php?urlid=61'),
(300, '2014-05-29 04:27:16', 61, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/linkprofile.php?urlid=61'),
(301, '2014-05-29 04:27:54', 61, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/linkprofile.php?urlid=61'),
(299, '2014-05-29 04:26:47', 61, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/index.php'),
(297, '2014-05-29 04:26:05', 61, 'f', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/linkprofile.php?urlid=61'),
(298, '2014-05-29 04:26:29', 61, 'f', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/Editurl.php'),
(296, '2014-05-29 04:25:30', 61, 'f', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/index.php'),
(295, '2014-05-29 04:24:58', 57, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/download.php?downcode=k1c4z0h1r2v8t7x4i0s3'),
(294, '2014-05-29 04:24:33', 58, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/download.php?downcode=j1b4i0f1t2s8c7l6n5t4'),
(293, '2014-05-29 04:11:55', 61, 'd', '127.0.0.1', 'http://localhost/Satyam/ProtectedLinks/admin/index.php');

-- --------------------------------------------------------

--
-- Table structure for table `banip`
--

CREATE TABLE IF NOT EXISTS `banip` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `ip` text COLLATE utf8_unicode_ci NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `permissions`
--

CREATE TABLE IF NOT EXISTS `permissions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `showfilename` text COLLATE utf8_unicode_ci NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `notdl` tinyint(1) NOT NULL DEFAULT '0',
  `url` varchar(300) COLLATE utf8_unicode_ci NOT NULL,
  `downcode` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `usertype` char(1) COLLATE utf8_unicode_ci NOT NULL,
  `iprestrict` text COLLATE utf8_unicode_ci NOT NULL,
  `restrictedip` text COLLATE utf8_unicode_ci NOT NULL,
  `ipaccessno` int(5) NOT NULL,
  `expnos` int(5) NOT NULL,
  `exptime` int(5) NOT NULL,
  `firstaccess` datetime NOT NULL,
  `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `exptimerespect` char(1) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `downcode` (`downcode`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=65 ;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `showfilename`, `title`, `description`, `notdl`, `url`, `downcode`, `usertype`, `iprestrict`, `restrictedip`, `ipaccessno`, `expnos`, `exptime`, `firstaccess`, `timestamp`, `exptimerespect`) VALUES
(63, 'sixthlifewebsite', 'sixthlifewebsite', '', 1, 'http://sixthlife.net/product/sixthlife-search', 's1k4s0t1j3d6x2q4o6l9', 's', '', '', 0, 0, 0, '0000-00-00 00:00:00', '2014-05-29 11:21:09', 'L'),
(55, 'simpledoc', 'simpledoc', '', 0, 'http://www.sixthlife.net/ProtectedLinks/demo/sec_files/sampledoc.doc', 'r1o4x0o1v2d8z7z0c8g3', 's', '', '', 0, 0, 0, '0000-00-00 00:00:00', '2014-05-28 14:24:43', 'L'),
(57, 'samplezip', 'samplezip', '', 0, 'http://www.sixthlife.net/ProtectedLinks/demo/sec_files/samplezip.zip', 'k1c4z0h1r2v8t7x4i0s3', 's', '', '', 0, 0, 0, '0000-00-00 00:00:00', '2014-05-28 14:30:03', 'L'),
(58, 'samplexls', 'samplexls', '', 0, 'http://www.sixthlife.net/ProtectedLinks/demo/sec_files/samplexls.xls', 'j1b4i0f1t2s8c7l6n5t4', 's', '', '', 0, 0, 0, '0000-00-00 00:00:00', '2014-05-28 14:34:14', 'L'),
(61, 'youtube', 'youtube', '', 1, 'http://www.sixthlife.net', 'w1m4s0v1j3s5z6u4m6p7', 's', '', '', 0, 10, 0, '0000-00-00 00:00:00', '2014-05-29 09:41:07', 'L');

-- --------------------------------------------------------

--
-- Table structure for table `settings`
--

CREATE TABLE IF NOT EXISTS `settings` (
  `id` int(5) NOT NULL AUTO_INCREMENT,
  `logo` varchar(255) NOT NULL,
  `product_logo` varchar(5) NOT NULL,
  `default_search` varchar(10) NOT NULL,
  `default_timezone` varchar(225) NOT NULL,
  `accesstime_f` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `logo`, `product_logo`, `default_search`, `default_timezone`, `accesstime_f`) VALUES
(1, 'your-logo-here.jpg', 'yes', 'dcode', 'Etc/UTC', '');

-- --------------------------------------------------------

--
-- Table structure for table `userlogin`
--

CREATE TABLE IF NOT EXISTS `userlogin` (
  `id` int(2) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `group` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;

--
-- Dumping data for table `userlogin`
--

INSERT INTO `userlogin` (`id`, `username`, `password`, `group`, `email`) VALUES
(1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'a', '');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Compartilhar este post


Link para o post
Compartilhar em outros sites

erro bem claro: "banco de dados não selecionado"..

(última linha da sua figura).

Compartilhar este post


Link para o post
Compartilhar em outros sites

  • Conteúdo Similar

    • Por daemon
      Tenho 3 selects assim com varias categorias...
       
              $sql = "SELECT * FROM topicos          WHERE idcategoria = $idcategoria          AND pubdate BETWEEN NOW() - INTERVAL $intervalo1_horas_ou_minutos $tipo_intervalo1_horas_mnutos AND          NOW() - $intervalo2_horas_ou_minutos ORDER BY pubdate DESC LIMIT 1"; Preciso que na minha pagina principal (index) mostre este registro por 10minutos.. passando de 10 minutos mostra o resultado do proximo select (categoria)..
    • Por ILR master
      Boa tarde, pessoal.
      Espero que todos estejam bem.
       
      Seguinte:
      Tenho a seguinte consulta:
       
      $usuarios= "SELECT * FROM usuarios";
      $query= mysqli_query($conexao, $usuarios) or die ("Usuário não encontrado");
      $usuario = mysqli_fetch_array($query);
       
      Quero pegar apenas o campo 'nome' da tabela 'usuarios' e colocar todos os resultados da seguinte forma:
       
      $nomes = array("Rafael", "João", "Maria", "Pedro", "Patricia", "Camila");
       
      Agradeço desde já.
      Abs
       
       
    • Por FabianoSouza
      Tenho uma function que precisa receber 02 argumentos.
      Ela funciona se eu aplicar num select qualquer. Mas se eu aplicar num select dinâmico, ocorre erro.
      Veja trecho do meu select.
      ... SET @sql = @sql +', dbo.retornaIco_ItemBloq((SELECT COUNT(*) FROM dbo.tab AS TT2 WHERE TT2.codCategTreina = CTT.id),'+@title+') AS ''resp''' ... No caso, o primeiro argumento da function dbo.retornaIco_ItemBloq é um SELECT COUNT.
      O segundo argumento é uma variável (que está devidamente declarada e definida).
       
      O erro ocorre porque ao executar (chamando EXEC(@sql) ), o SQL entende que o segundo argumento é uma coluna da consulta principal, pois existe uma vírgula antes da variável @title (que é o segundo argumento da function).
      Repito. Se eu aplicar essa function num select normal, funciona normalmente. Porém, preciso que funcione num SQL dinâmico porque é esse é o padrão que estou adotando para o sistema todo.
       
      A function dbo.retornaIco_ItemBloq faz o seguinte:
      1) Recebe o valor do COUNT e da variável @title
      2) Se o COUNT for maior que  Zero, cria uma tag HTML (uma SPAN), define sua title com o valor da variável @title e passa para uma variável
      3) Retorna o HTML que será exibido no resultado da consulta principal
      É super simples.
       
      Há outra forma de chamar a function?
    • Por mr22robot
      Ola caros amigos. 
      Estou com uma dúvida aqui que embora nao tenho achado ainda uma resposta, acredito que haja.
      Estou estudando a tão sonhada linguagem de programação asp.net core mvc. Linguagem essa que demorei 5 anos pra iniciar os estudos rsrs.
      Mas estou agarrado em uma situação. 
      Estou usando como base de dados nos meus estudos um banco Oracle. Que já tem algumas informações nele. Utilizei o SCAFFOLD para criar as classes e o contexto baseado no banco e tabelas existentes. 
      Porem agora na fase das consultas, estou perdido em como utilizar o IN que eu utilizo no oracle; no LINQ.
      Ex: 
      SELECT CODPROD,DESCRICAO FROM PRODUTO WHERE CODPROD IN(1,2,3,4,5,6) Como eu utilizo esse filtro com uma restrição de códigos de produtos? no caso o where codprod in(1,2,3,4,5,6) ?.
      Desde já obrigado pela ajuda.
    • Por Sapinn
      Olá a todos existe alguma maneira de trazer todos os dados de uma tabela menos o maior valor?
×

Informação importante

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