Skip to content

Commit ca374c7

Browse files
author
Max Base
authored
Add selectRaw()
1 parent 08338f6 commit ca374c7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

source/phpedb.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ public function disconnect()
6868
{
6969
$this->database=null;
7070
}
71+
public function selectRaw($query)
72+
{
73+
try
74+
{
75+
$stmt = $this->database->prepare($query);
76+
$stmt->execute();
77+
return $stmt->fetch(PDO::FETCH_ASSOC);
78+
}
79+
catch(PDOException $e)
80+
{
81+
error_page($e->getMessage());
82+
}
83+
}
7184
public function query($query,$error=true)
7285
{
7386
try

0 commit comments

Comments
 (0)