Nueva pregunta

Pregunta:

Fecha: 16-07-2019 05:46:34 (En Español)

Fatal error: Uncaught Error: Call to undefined method PDO::prepared()[Resuelta]

Fatal error: Uncaught Error: Call to undefined method PDO::prepared() in C:\xampp\htdocs\Curso\PHP Y DB\PDO.PHP:9 Stack trace: #0 {main} thrown in C:\xampp\htdocs\Curso\PHP Y DB\PDO.PHP on line 9.


<?php

try{

$conexion= new PDO('mysql:host=localhost;dbname=pruebacurso','root','');

$statement = $conexion->prepared('SELECT * FROM prueba WHERE Id= :Id');

$statement->execute(array(':Id' => 5)
);

$resultados = $statement->fetch();
 print_r($resultados);




} catch (PDOEXCEPPTION $e) {
	//mostrar error
	echo 'Error:'. $e->getMessage();
}


?>
Etiquetas: Base de Datos - MySQL - PHP - PHP Avanzado - PHP PDO - Pregunta Votos: 0 - Respuestas: 1 - Vistas: 8 Compartir en: Google Facebook Twitter LinkedIn Link
 

Respuestas:

Para participar activamente de la comunidad primero debes autenticarte, ingresa al sistema.Iniciar Sesión
 
frjcbbae garagebible.com