0

I just realized that the pear:DB extension is deprecated and I'm working on updating some scripts to MDB2. I'm a little disappointed how cumbersome the placeholder arrangement is. Am I missing something? Is there a shorthand available that is equivalent to the pear:DB construct:

$result = $db->query("SELECT * FROM table WHERE column1 = ? AND column2 = ?", array($column1, $column2);

As far as I can tell, achieving the same result (no pun intended) would require several lines and a call to MDB2-prepare(), MDB2->execute() etc....

Is any shorthand construct available for MDB2?

starsinmypockets
  • 2,264
  • 4
  • 34
  • 45

1 Answers1

1

No, there is none. You have to use prepare() + execute().

cweiske
  • 30,033
  • 14
  • 133
  • 194