Example #1
0
function _db_update($tbl, $hash, $where, $cluster, $shard)
{
    $bits = array();
    foreach (array_keys($hash) as $k) {
        $bits[] = "`{$k}`='{$hash[$k]}'";
    }
    return _db_write("UPDATE {$tbl} SET " . implode(', ', $bits) . " WHERE {$where}", $cluster, $shard);
}
Example #2
0
	function _db_update($tbl, $hash, $where, $cluster, $shard=null){

		$bits = array();
		foreach(array_keys($hash) as $k){
			$bits[] = "`$k`='$hash[$k]'";
		}

		return _db_write("UPDATE $tbl SET ".implode(', ',$bits)." WHERE $where", $cluster, $shard);
	}