sp; $sp->setString($sqlstring); $vals=$sp->parseSqlQuery(); $table=$vals->table; $search=trim($vals->where_expr); for($i=0;$icolNames);$i++) { if($vals->fieldValues[$i][0]=="'" || $vals->fieldValues[$i][0]=="\"" ) $set[ ($vals->colNames[$i] )]=substr($vals->fieldValues[$i],1,strlen($vals->fieldValues[$i])-2); else $set[ ($vals->colNames[$i] )]=$vals->fieldValues[$i]; } if (!@include_once ($thiz->db_name.$table.'/schema.php')) { $thiz->ErrorMsg[0] = DB_ERRORMSG_102; } else { if (isset ($columns) && is_array ($columns)) { $thiz->columns = $columns; } include_once('read_table.php'); is_array ($set) ? $rs = _read_table($thiz, $thiz->db_name.$table, '', $search) : $thiz->ErrorMsg[] = DB_ERRORMSG_101; if (is_array ($thiz->rowset)) { foreach ($thiz->rowset as $row) { foreach ($row as $key=>$val) { if (!isset ($set[$key])) { $set[$key] = $val; } } include_once('write_table.php'); if ($rs = _write_table($thiz, $table, $row['id'], $set)) { $thiz->aff_rows++; } else { $rs = false; } } } else { $thiz->aff_rows = 0; } $thiz->rowset = false; } if ($rs) { return true; } else { return false; } } ?>