Changeset 320 for trunk/database.php
- Timestamp:
- Nov 27, 2011, 6:31:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/database.php
r319 r320 33 33 var $PDO; 34 34 var $Error = ''; 35 var $insert_id; 36 var $LastQuery = ''; 35 37 36 38 function __construct($Host, $User, $Password, $Database) … … 51 53 global $Config; 52 54 55 $this->LastQuery = $Query; 53 56 if($Config['Web']['ShowSQLQuery'] == true) 54 57 echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; padding-bottom: 3px; padding-top: 3px; font-size: 12px; font-family: Arial;">'.$Query.'</div>'."\n"); … … 85 88 $Values = substr($Values, 1); 86 89 $this->PDO->query('INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')'); 90 $this->insert_id = $this->PDO->lastInsertId(); 87 91 } 88 92 … … 121 125 } 122 126 127 function real_escape_string($Text) 128 { 129 return(addslashes($Text)); 130 } 131 123 132 } 124 133
Note:
See TracChangeset
for help on using the changeset viewer.