--- parser3/src/classes/table.C 2010/11/06 00:05:46 1.277 +++ parser3/src/classes/table.C 2010/11/26 06:40:01 1.279 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_TABLE_C="$Date: 2010/11/06 00:05:46 $"; +static const char * const IDENT_TABLE_C="$Date: 2010/11/26 06:40:01 $"; #if (!defined(NO_STRINGSTREAM) && !defined(FREEBSD4)) #include @@ -1064,7 +1064,7 @@ public: columns(*new ArrayString), row(0), table(0) { } - bool add_column(SQL_Error& error, const char *str, size_t length) { + bool add_column(SQL_Error& error, const char *str, size_t ) { try { columns+=new String(str, String::L_TAINTED /* no length as 0x00 can be inside */); return false; @@ -1092,7 +1092,7 @@ public: return true; } } - bool add_row_cell(SQL_Error& error, const char* str, size_t length) { + bool add_row_cell(SQL_Error& error, const char* str, size_t ) { try { *row+=new String(str, String::L_TAINTED /* no length as 0x00 can be inside */); return false; @@ -1246,6 +1246,7 @@ static void _select(Request& r, MethodPa int limit=source_table.count(); int offset = 0; bool reverse = false; + if(params.count()>1) { Value& voptions=params.as_no_junction(1, "options must be hash, not code"); if(voptions.is_defined() && !voptions.is_string()) @@ -1279,13 +1280,13 @@ static void _select(Request& r, MethodPa if(reverse){ for(int row=size-1; row >=0 && result_table.count() < limit; row--) { - source_table.set_current(row); + source_table.set_current(row); bool condition=r.process_to_value(vcondition, false/*don't intercept string*/).as_bool(); if(condition && ++appended > offset) // ...condition is true, adding to the result - result_table+=source_table[row]; - } + result_table+=source_table[row]; + } } else { for(int row=0; row < size && result_table.count() < limit; row++) { source_table.set_current(row); @@ -1293,7 +1294,7 @@ static void _select(Request& r, MethodPa bool condition=r.process_to_value(vcondition, false/*don't intercept string*/).as_bool(); if(condition && ++appended > offset) // ...condition is true, adding to the result - result_table+=source_table[row]; + result_table+=source_table[row]; } } source_table.set_current(saved_current);