From: Anthony Minessale Date: Thu, 8 Jul 2010 06:22:26 +0000 (-0500) Subject: fix sql to be more portable for tab complete X-Git-Tag: v1.2-rc1~553 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=200cc44f6755fcfdedde69b17a75bf232a610013;p=thirdparty%2Ffreeswitch.git fix sql to be more portable for tab complete --- diff --git a/src/switch_console.c b/src/switch_console.c index 353a30319d..472cdc48d3 100644 --- a/src/switch_console.c +++ b/src/switch_console.c @@ -756,7 +756,7 @@ SWITCH_DECLARE(unsigned char) switch_console_complete(const char *line, const ch } } - stream.write_function(&stream, " and hostname='%s' order by a1,a2,a3,a4,a5,a6,a7,a8,a9,a10", switch_core_get_variable("hostname")); + stream.write_function(&stream, " and hostname='%s' order by a%d", switch_core_get_variable("hostname"), h.words + 1); switch_cache_db_execute_sql_callback(db, stream.data, comp_callback, &h, &errmsg); if (errmsg) {