Hello,

Le mardi 05 janvier 2010 14:53:42, Holger Mueller a écrit :
> Hi,
> 
> is it possible to modify the sql query to get alphabetical
> order of clients when selecting the most recent backup for a client?

In other menus, the list is displayed in the same order than in the 
configuration file. It allows you to prioritize some entries.

Given the fact that this query actually returns records without order, i will 
apply your patch, but a better solution would be to build a list that respects 
the configuration file order and adds old catalog entries.

Bye

> A patch for recent git version of bacula looks like this:
> 
> ----8<------------
> diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c
> index 95dbf32..4e34e73 100644
> --- a/bacula/src/cats/sql_get.c
> +++ b/bacula/src/cats/sql_get.c
> @@ -568,7 +568,7 @@ int db_get_client_ids(JCR *jcr, B_DB *mdb, int
> *num_ids, uint32_t *ids[])
> 
>      db_lock(mdb);
>      *ids = NULL;
> -   Mmsg(mdb->cmd, "SELECT ClientId FROM Client");
> +   Mmsg(mdb->cmd, "SELECT ClientId FROM Client ORDER BY Name");
>      if (QUERY_DB(jcr, mdb, mdb->cmd)) {
>         *num_ids = sql_num_rows(mdb);
>         if (*num_ids > 0) {
> ----8<-----------
> 
> regards
>       Holger
> 

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to