Warning: mysqli_select_db() expects parameter 1 to be mysqli
Publicado por piston (1 intervención) el 01/03/2015 23:22:26
La cosa son estos tres errores:molesto:
Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in /home/u323553024/public_html/foro/configuracion.php on line 8
Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in /home/u323553024/public_html/foro/configuracion.php on line 8
Warning: mysql_num_rows() expects parameter 1 to be resource, null given in /home/u323553024/public_html/foro/index.php on line 10
configuracion:
index:
no los puedo solucionar me podrian desir enque me equivoco



Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in /home/u323553024/public_html/foro/configuracion.php on line 8
Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in /home/u323553024/public_html/foro/configuracion.php on line 8
Warning: mysql_num_rows() expects parameter 1 to be resource, null given in /home/u323553024/public_html/foro/index.php on line 10
configuracion:
1
2
3
4
5
6
7
8
9
<?php
$bd_host = "mysql.hostinger.com.ar";
$bd_usuario = "usuario";
$bd_password = "password";
$bd_base = "mibasedatos";
$con = mysqli_connect($bd_host, $bd_usuario, $bd_password);
mysqli_select_db($bd_base, $con);
?>
index:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require('configuracion.php');
require('funciones.php');
include('header.html');
/* Pedimos todos los temas iniciales (identificador==0)
* y los ordenamos por ult_respuesta */
$sql = "SELECT id, autor, titulo, fecha, respuestas, ult_respuesta ";
$sql.= "FROM foro WHERE identificador=0 ORDER BY ult_respuesta DESC";
$rs = mysqli_query($conexion, $query);
if(mysql_num_rows($rs)>0)
{
// Leemos el contenido de la plantilla de temas
$template = implode("", file("temas.html"));
include('titulos.html');
while($row = mysql_fetch_assoc($rs))
{
$color=($color==""?"#5b69a6":"");
$row["color"] = $color;
mostrarTemplate($template, $row);
}
}
include('footer.html');
?>




Valora esta pregunta


0