<?php
/* Execute a prepared statement by passing an array of values */
$sth = $dbh->prepare('SELECT name, colour, calories
    FROM fruit
    WHERE calories < ? AND colour = ?
');
$sth->execute(array(150, 'red'));
$red = $sth->fetchAll();
$sth->execute(array(175, 'yellow'));
$yellow = $sth->fetchAll();
?>

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2021-09-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-03-01
  • 2021-10-04
  • 2021-04-09
相关资源
相似解决方案