Skip to content

Instantly share code, notes, and snippets.

@awartoft
Created July 2, 2012 14:45
Show Gist options
  • Save awartoft/3033594 to your computer and use it in GitHub Desktop.
Save awartoft/3033594 to your computer and use it in GitHub Desktop.
<?php
/**
* @author Antoine Hedgecock <[email protected]>
*/
/**
* @namespace
*/
namespace MCN\Repository;
use MCNCore\Object\Entity\Repository;
class View extends Repository
{
public function insert(array $values)
{
$stmt = $this->manager->getConnection()
->prepare('INSERT IGNORE INTO MCN_doctrine_view VALUES (:target_type, :target_id, :hash)');
$stmt->bindValue('target_type', $values['target_type']);
$stmt->bindValue('target_id', $values['target_id']);
$stmt->bindValue('hash', $values['hash']);
$stmt->execute();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment