[Phplib-trackers] [ phplib-Bugs-541551 ] gb_mysql lock tables
Brought to you by:
nhruby,
richardarcher
|
From: <no...@so...> - 2002-04-09 14:02:28
|
Bugs item #541551, was opened at 2002-04-09 14:02 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=541551&group_id=31885 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: NickM (terado) Assigned to: Nobody/Anonymous (nobody) Summary: gb_mysql lock tables Initial Comment: When issuing a lock command with an array of values, e.g.: $db->lock(array("table1"=>"read", "table2"=>"read")); this is resolved wrongly in the lock function, and instead attempts: lock tables read table1, read table2 now if the array is created the other way the obviously "read" would be the index and be overwritten!! Resolve: $key/$value other way around:- while (list($key,$value) = each($table)) { if (!is_int($key)) { // lock modes are "read", "read local", "write", "low priority write" $query .= "$key $value, "; } else { $query .= "$key $mode, "; } } ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=541551&group_id=31885 |