Comunidad de diseño web y desarrollo en internet online

error con la función fetch_array

Citar            
MensajeEscrito el 20 Jul 2016 09:12 am
Hola a todos.
Estoy empezando con PHP y al hacer la consulta a la base de datos me muestra el siguiente error:

[Wed Jul 20 10:56:05.791008 2016] [:error] [pid 3141] [client ::1:52150] PHP Fatal error: Uncaught Error: Call to a member function fetch_array() on boolean in /var/www/html/curso/seleccion.php:11\nStack trace:\n#0 {main}\n thrown in /var/www/html/curso/seleccion.php on line 10

El código que tengo es el siguiente:

<?php
$con = new mysqli("localhost","ramon","1234","dbramon");
if($con->connect_error){
die("No se ha podido realizar la conexion ".$con->connect_error);
}

$consulta = "SELECT FROM * personas";
$resultado = $con->query($consulta);

while ($fila = $resultado->fetch_array()){
echo $fila['nombre'];//." ".$fila['apellido']." ".$fila['telf']." ".$fila['email'];
echo "<br>";
}
$con->close();
?>

Por fmramon

0 de clabLevel



 

chrome
Citar            
MensajeEscrito el 10 Ago 2016 07:01 pm
Eso es porque la consulta no da ningún resultado, y entonces mysqli_fetch_array falla.

Tienes mal colocado el asterisco, que va delante del FROM, en lugar de detras como lo has puesto.

Saludos.

Por loiscr

1 de clabLevel



Genero:Masculino  

programador php css

chrome
Citar            
MensajeEscrito el 27 Nov 2017 10:10 am
20171127 leilei3915
polo ralph lauren outlet online
coach factory outlet
canada goose outlet online
ugg outlet
adidas yeezy shoes
ralph lauren uk
hermes outlet
uggs outlet
michael kors outlet
polo ralph lauren
michael kors outlet clearance
fitflops clearance
polo outlet
cheap jordans
nike air max
canada goose sale
pandora jewelry
uggs outlet
ugg boots clearance
moncler sale
ray ban sunglasses
ralph lauren
uggs canada
uggs outlet
uggs outlet
kate spade outlet
ralph lauren outlet
canada goose sale
nike shoes
michael kors outlet clearance
ugg outlet store
giuseppe zanotti shoes
ugg boots clearance
ray ban sunglasses outlet
oakley sunglasses
pandora jewelry sale
oakley sunglasses
tory burch outlet stores
ugg outlet online
canada goose jackets
oakley sunglasses wholesale
coach outlet online
cheap oakley sunglasses
canada goose
fred perry clothing
pandora jewelry
canada goose
true religion outlet
mont blanc outlet
adidas yeezy
nike outlet
canada goose outlet store
coach factory outlet
canada goose jackets
pandora jewelry
ugg outlet online clearance
cheap jerseys wholesale
ralph lauren outlet
ralph lauren
coach factory outlet
coach factory outlet
nike outlet store
michael kors outlet clearance
fitflops shoes
ralph lauren uk
true religion outlet store
true religion
pandora bracelet
air jordan retro
true religion outlet
lebron shoes
fitflops sale clearance
yeezy boost 350
true religion outlet online
coach outlet
michael kors outlet
coach outlet online coach factory outlet
coach outlet online
ugg outlet
oakley sunglasses wholesale
cheap mlb jerseys
ugg outlet
fitflops sale
fitflop sandals
ugg boots clearance
nike outlet
air max 90
ugg boots on sale
michael kors outlet clearance
michael kors handbags
adidas nmd
pandora jewelry
michael kors outlet clearance
michael kors outlet clearance
michael kors outlet clearance
ugg boots
canada goose jackets
uggs outlet
adidas nmd r1
longchamp handbags
ugg boots outlet
cheap ugg boots
michael kors outlet
mulberry outlet
coach outlet online
michael kors outlet online store
uggs outlet
oakley sunglasses wholesale
pandora outlet
christian louboutin shoes
canada goose outlet
michael kors outlet online
ugg outlet
polo ralph lauren
polo ralph lauren outlet
polo ralph lauren outlet
pandora outlet
polo outlet
michael kors
kate spade outlet
ugg sale
canada goose jackets canada
cheap ugg boots
ugg boots outlet
nmd adidas
longchamp outlet
michael kors outlet
ugg outlet
michael kors outlet
michael kors handbags sale
polo ralph lauren
canada goose outlet store
ugg outlet
ugg outlet
pandora charms sale clearance
ray ban outlet
moncler jackets
uggs outlet
ugg boots outlet
mont blanc pens
ugg outlet
ray ban
coach factory outlet
coach outlet online
canada goose jackets
michael kors outlet
polo outlet
canada goose outlet stores
fred perry polo
michael kors outlet

Por leilei3915

72 de clabLevel



 

firefox

   Página 1 de 1

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.