Hello. I just changed my hosting to x10hosting, and I uploaded my files and databases. Then, I got lots of errors when I used "mysql_query()". I looked for the mysql error and I got this:
SELECT command denied to user 'sfcpfcmw_bd'@'localhost' for table 'ejercitos'
I granted all the privileges to this user, using the x10hosting basic panel, but I'm still getting this error.
Can you help me? Thanks in advance.
Here's my code:
SELECT command denied to user 'sfcpfcmw_bd'@'localhost' for table 'ejercitos'
I granted all the privileges to this user, using the x10hosting basic panel, but I'm still getting this error.
Can you help me? Thanks in advance.
Here's my code:
PHP:
<?php
$db_host = 'localhost';
$db_user = 'sfcpfcmw_bd';
$db_pass = '/* I wont put this */';
$db_database = 'sfcpfcmw_liga';
$link = mysql_connect($db_host,$db_user,$db_pass) or die('No se pudo conectar con la Base de Datos');
mysql_select_db($db_database,$link);
mysql_query("SET names ISO-8859-1");
require 'functions.php';
$resultado = mysql_query("SELECT * FROM `sfcpfcmw_liga`.`ejercitos` WHERE id = 1") or die(mysql_error()); // <--- Thist is when the error happens
$fila = mysql_fetch_assoc($resultado);
echo $fila['usr'];
?>