Use PDO syntax for class queries

feature/node-rewrite
Sven Slootweg 12 years ago
parent 189cdf2eb5
commit 225633ac1d

@ -16,8 +16,8 @@ if(!isset($_CVM)) { die("Unauthorized."); }
class Node extends CPHPDatabaseRecordClass class Node extends CPHPDatabaseRecordClass
{ {
public $table_name = "nodes"; public $table_name = "nodes";
public $fill_query = "SELECT * FROM nodes WHERE `Id` = '%d'"; public $fill_query = "SELECT * FROM nodes WHERE `Id` = :Id";
public $verify_query = "SELECT * FROM nodes WHERE `Id` = '%d'"; public $verify_query = "SELECT * FROM nodes WHERE `Id` = :Id";
public $prototype = array( public $prototype = array(
'string' => array( 'string' => array(

@ -16,8 +16,8 @@ if(!isset($_CVM)) { die("Unauthorized."); }
class Template extends CPHPDatabaseRecordClass class Template extends CPHPDatabaseRecordClass
{ {
public $table_name = "templates"; public $table_name = "templates";
public $fill_query = "SELECT * FROM templates WHERE `Id` = '%d'"; public $fill_query = "SELECT * FROM templates WHERE `Id` = :Id";
public $verify_query = "SELECT * FROM templates WHERE `Id` = '%d'"; public $verify_query = "SELECT * FROM templates WHERE `Id` = :Id";
public $prototype = array( public $prototype = array(
'string' => array( 'string' => array(

@ -16,8 +16,8 @@ if(!isset($_CVM)) { die("Unauthorized."); }
class Vps extends CPHPDatabaseRecordClass class Vps extends CPHPDatabaseRecordClass
{ {
public $table_name = "containers"; public $table_name = "containers";
public $fill_query = "SELECT * FROM containers WHERE `Id` = '%d'"; public $fill_query = "SELECT * FROM containers WHERE `Id` = :Id";
public $verify_query = "SELECT * FROM containers WHERE `Id` = '%d'"; public $verify_query = "SELECT * FROM containers WHERE `Id` = :Id";
public $prototype = array( public $prototype = array(
'string' => array( 'string' => array(

Loading…
Cancel
Save