Changeset 206 for branches/awmn/globals/classes/mysql.php
- Timestamp:
- 10/03/2009 02:39:52 PM (3 years ago)
- File:
-
- 1 edited
-
branches/awmn/globals/classes/mysql.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/awmn/globals/classes/mysql.php
r198 r206 4 4 * 5 5 * Copyright (C) 2005 Nikolaos Nikalexis <winner@cube.gr> 6 * Copyright (C) 2009 Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> 6 7 * 7 8 * This program is free software; you can redistribute it and/or modify … … 173 174 } 174 175 175 function del($table, $ where="", $addlog=TRUE) {176 function del($table, $using="", $where="", $addlog=TRUE) { 176 177 $table_start = preg_split("/[\s,]+/", $table); 177 178 $table_start = $table_start[0]; 178 if ($addlog && $this->log) $aff = $this->query_data("SELECT ".$table_start.".id FROM $table".($where==""?"":" WHERE $where"));179 $query = "DELETE FROM $table".($ where==""?"":" WHERE $where");179 if ($addlog && $this->log) $aff = $this->query_data("SELECT ".$table_start.".id FROM ".($using==""?"$table":"$using").($where==""?"":" WHERE $where")); 180 $query = "DELETE FROM $table".($using==""?"":" USING $using").($where==""?"":" WHERE $where"); 180 181 $res = $this->query_data($query); 181 182 if ($addlog && isset($aff)) {
Note: See TracChangeset
for help on using the changeset viewer.
