-
Conteúdo Similar
-
Por neijuniorgomes
Oi pessoal, tudo certo, estou com esse problema em um script:
Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /home/logawebc/public_html/apostas/site/menu_jogos.phpon line 22
Essa linha 22 no menu_jogos.php está aqui:
//die($sql_campeonato); $query_campeonato = mysql_query($sql_campeonato); $conta_campeonato_sim = mysql_num_rows($query_campeonato);
O arquivo de conexão é este:
<meta charset="UTF-8" /> <?php //Não mostrar erros PHP //error_reporting(0); //$conexao = mysql_connect("188.93.231.208", "betdasor_remoto", "bancoremoto123") or die("Erro ao logar no Banco!"); //$conexao = mysql_connect("localhost", "root", "uj1h8h17") or die("Erro ao logar no Banco!"); //$conexao = mysql_connect("localhost", "gestorde_betdasor_bd", "fK#bOlRt#T1%") or die("Erro ao logar no Banco!"); //$db = mysql_select_db("betdasor_bd") or die("Banco de Dados nao encontrado!"); //mysql_query("SET NAMES 'utf8'"); //mysql_query('SET character_set_connection=utf8'); //mysql_query('SET character_set_client=utf8'); //mysql_query('SET character_set_results=utf8'); ini_set("display_errors", "off"); $host = "localhost"; $user = "root"; $password = "XXX"; $database = "betdasor_remoto"; global $db; $db = mysqli_connect($host, $user, $password, $database); function mysql_query($query) { $db = $GLOBALS['db']; return mysqli_query($db, $query); } function mysql_num_rows($result) { return mysqli_num_rows($result); } function mysql_fetch_array($result) { return mysqli_fetch_array($result); } E a tabela do banco de dados é esta:
-- Estrutura para tabela `jogos_placarmania`
--
CREATE TABLE `jogos_placarmania` ( `id` int(11) NOT NULL, `campeonato` varchar(100) DEFAULT NULL, `data` varchar(100) DEFAULT NULL, `hora` varchar(100) DEFAULT NULL, `destaque` varchar(10) DEFAULT NULL, `prioridade` varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- --------------------------------------------------------
Podem me ajudar? Obrigado!
-
Por Kassio Silveira
CREATE TABLE `locutor_dados` (
`id` INT( 5 ) NOT NULL AUTO_INCREMENT ,
`idcat` CHAR( 3 ) NOT NULL DEFAULT '',
`nome` VARCHAR( 30 ) NOT NULL DEFAULT '',
`email` VARCHAR( 80 ) DEFAULT NULL ,
`data` DATE NOT NULL DEFAULT '0000-00-00',
`titulo` TEXT NOT NULL ,
`subtitulo` TEXT,
`texto` TEXT NOT NULL ,
`foto01` VARCHAR( 50 ) DEFAULT NULL ,
`fotos_extras` CHAR( 3 ) NOT NULL DEFAULT 'nao',
`alinhamento_foto` VARCHAR( 5 ) NOT NULL DEFAULT 'left',
`borda` CHAR( 3 ) NOT NULL DEFAULT '',
`creditos_foto` VARCHAR( 255 ) NOT NULL DEFAULT `destaque` c har( 3 ) NOT NULL DEFAULT 'nao', `largura_foto` c har( 3 ) NOT NULL DEFAULT '405', `altura_foto` c har( 3 ) NOT NULL DEFAULT '', PRIMARY KEY ( `id`), UNIQUE KEY `id` ( `id`) ) ENGINE = MYISAM AUTO_INCREMENT =2 DEFAULT CHARSET = latin1; Estou com esse erro, alguem me ajuda
-