src/cats/sql.c
void 
list_dashes(BDB *mdb, DB_LIST_HANDLER *send, void *ctx) 
{ 
   SQL_FIELD  *field; 
   int i, j; 
   int len; 
 
   mdb->sql_field_seek(0); 
   send(ctx, "+"); 
   for (i = 0; i < mdb->sql_num_fields(); i++) { 
      field = mdb->sql_fetch_field(); 
      if (!field) { 
         break; 
      } 
      len = max_length(field->max_length + 2); 
      for (j = 0; j < len; j++) { 
         send(ctx, "-"); 
      } 
      send(ctx, "+"); 
   } 
   send(ctx, "\n"); 
}
/* 
 * List dashes as part of header for listing SQL results in a table 
 */
List dashes as part of header for listing SQL results in a table
List dashes as part of header for listing SQL results in a table
void 
list_dashes(BDB *mdb, DB_LIST_HANDLER *send, void *ctx) 
{ 
   SQL_FIELD  *field; 
   int i, j; 
   int len; 
   mdb->sql_field_seek(0); 
   send(ctx, "+"); 
   for (i = 0; i < mdb->sql_num_fields(); i++) { 
      field = mdb->sql_fetch_field(); 
      if (!field) { 
         break; 
      } 
      len = max_length(field->max_length + 2); 
      for (j = 0; j < len; j++) { 
         send(ctx, "-"); 
      } 
      send(ctx, "+"); 
   } 
   send(ctx, "\n"); 
}
void list_dashes ( BDB * mdb , DB_LIST_HANDLER * send , void * ctx ) { SQL_FIELD * field ; int i , j ; int len ; mdb -> sql_field_seek ( 0 ) ; send ( ctx , " " ) ; for ( i = 0 ; i < mdb -> sql_num_fields ( ) ; i ++ ) { field = mdb -> sql_fetch_field ( ) ; if ( ! field ) { break ; } len = max_length ( field -> max_length + 2 ) ; for ( j = 0 ; j < len ; j ++ ) { send ( ctx , " " ) ; } send ( ctx , " " ) ; } send ( ctx , " \n " ) ; }
List dashes as part of header for listing SQL results in a table
List dashes as part of header for listing SQL results in a table