-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogClass.php
26 lines (22 loc) · 851 Bytes
/
logClass.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
class Log {
private $db;
function __construct($db) {
$this->db = $db;
}
/**
* Elmenti adatbázisba a crash adatait
* @param $post
*/
function saveToDatabase($post) {
$sql = "SET NAMES UTF8";
$stmt = $this->db->prepare($sql);
$stmt->execute();
$sql = "INSERT INTO kozterlog (brand, model, android_version, app_version, user_crash_date,build,stack_trace,display,settings_secure,everything) VALUES (?,?,?,?,?,?,?,?,?,?)";
$stmt = $this->db->prepare($sql);
$stmt->execute(array($post["BRAND"],$post["PHONE_MODEL"],$post["ANDROID_VERSION"],$post["APP_VERSION_NAME"],$post["USER_CRASH_DATE"],$post["BUILD"],
$post["STACK_TRACE"],$post["DISPLAY"],$post["SETTINGS_SECURE"],print_r($post,true)));
$stmt->fetch(PDO::FETCH_ASSOC);
}
}
?>