コード例 #1
0
ファイル: update_rating.php プロジェクト: tanyushechka/upwork
<?php

require __DIR__ . '/autoload.php';
use App\Classes\Db;
$configDb = json_decode(file_get_contents(__DIR__ . '/config.json'));
$db = new Db($configDb);
$sql = 'UPDATE upwork SET rating = :rating WHERE id = :id';
$db->dbExecute($sql, [':rating' => $_GET['rating'], ':id' => $_GET['id']]);
コード例 #2
0
ファイル: Product.php プロジェクト: awful0/testing
 public function showProduct($prod)
 {
     $sql = 'SELECT Name, Descr FROM ' . static::getTable() . ' WHERE Path=:prod';
     $db = new Db();
     return $db->execute($sql, [':prod' => $prod]);
 }