예제 #1
0
function getTransaction()
{
    include '../../includes/database.php';
    $table = "transactions";
    $num = sql_GET_ALL($table, ["ID", "DESC"])[0]["ID"] + 1;
    $stmt = $db->prepare(sql_PUT($table));
    $ex = buildJSONInputWProps($table, ["Amount" => 4.5, "Type" => 1, "ID" => $num]);
    $stmt->execute($ex);
    return $num;
}
예제 #2
0
파일: get.php 프로젝트: nperez0111/Pizza
function sql_GET_SORT($req, $bool)
{
    //$bool?"sort by pref":"sort ASC"
    return $bool ? sql_GET_ALL($req[0], [$req[2], $req[3]]) : sql_GET_ALL($req[0], [$req[2], "ASC"]);
}