Ver Mensaje Individual
  #11 (permalink)  
Antiguo 16/05/2011, 15:53
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Ataque a mi web por inyección mysql

Cuando creas un query con prepared statements:
Código PHP:
Ver original
  1. $sQuery = "SELECT * FROM person WHERE id = ?";
  2. $stmt = $pdo->prepare($sQuery);
  3. $stmt->bindParam(1, $id, PDO::PARAM_INT);
  4. $stmt->execute();
  5. foreach ($stmt->fetchAll() as $row) {
  6.         var_dump($row);
  7. }

Saludos.