1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-08 16:36:25 +00:00
ocsms/db/SmsObject.php
2014-09-12 14:38:13 +02:00

41 lines
760 B
PHP

<?php
/**
* ownCloud - ocsms
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Loic Blot <loic.blot@unix-experience.fr>
* @copyright Loic Blot 2014
*/
namespace OCA\OcSms\Db;
use \OCP\IDb;
class Sms {
private $db;
public function __construct(IDb $db) {
$this->db = $db;
}
// @TODO
public function saveAll() {
}
public function find($id) {
$sql = 'SELECT * FROM `*PREFIX*myapp_authors` ' .
'WHERE `id` = ?';
$query = $db->prepareQuery($sql);
$query->bindParam(1, $id, \PDO::PARAM_INT);
$result = $query->execute();
while($row = $result->fetchRow()) {
return $row;
}
}
}
?>