--- parser3/src/classes/table.C 2011/11/19 04:15:31 1.282 +++ parser3/src/classes/table.C 2011/12/07 00:49:59 1.285 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_TABLE_C="$Date: 2011/11/19 04:15:31 $"; +static const char * const IDENT_TABLE_C="$Date: 2011/12/07 00:49:59 $"; #if (!defined(NO_STRINGSTREAM) && !defined(FREEBSD4)) #include @@ -209,7 +209,10 @@ static void _create(Request& r, MethodPa data.split(head, raw_pos_after, "\n", String::L_AS_IS, 1); if(head.count()) { size_t col_pos_after=0; - head[0]->split(*columns, col_pos_after, *separators.scolumn, String::L_AS_IS); + if(head[0]->is_empty()) + *columns += new String(); + else + head[0]->split(*columns, col_pos_after, *separators.scolumn, String::L_AS_IS); } } @@ -1275,7 +1278,10 @@ static void _select(Request& r, MethodPa Table& result_table=*new Table(source_table.columns()); - if(size_t size=source_table.count() && limit>0){ + size_t size=source_table.count(); + if(offset<0) + offset+=size; + if(size && limit>0 && offset>=0 && (size_t)offset