This usually means that the params to be bound were null or not specified.
The error probably comes from this line:
PHP Code:
$where = $photos->getAdapter()->quoteInto('id = ?', $id);
It's wise in your scripts to test for anything you retrieve with getParam();
e.g.
PHP Code:
public function deleteAction()
{
$id = $this->getRequest()->getParam('id');
if (!$id){
//error
}
//...
}