SHARE
TWEET

query Pdo

a guest Apr 18th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $sql = 'SELECT name, color, calories FROM fruit ORDER BY name';
  2.     foreach ($conn->query($sql) as $row) {
  3.         print $row['name'] . "\t";
  4.         print $row['color'] . "\t";
  5.         print $row['calories'] . "\n";
  6.     }
  7. /* ahora $row tiene mi consulta realizada por lo tanto para acceder a la consulta hago mediante el $row*/
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top