[Users] The lcr module has incorrect syntax for the current mysql release
Juha Heinanen
jh at tutpro.com
Fri Aug 4 12:43:25 CEST 2006
Brandon Price writes:
> SELECT gw.ip_addr, gw.port, gw.uri_scheme, gw.transport, gw.strip,
> gw.prefix FROM gw, lcr WHERE ''<sip:12345678910 at eastern.mynoc.net>''
> LIKE lcr.from_uri AND '15184782222' LIKE CONCAT(lcr.prefix, '%') AND
> lcr.grp_id = gw.grp_id ORDER BY CHAR_LENGTH(lcr.prefix), lcr.priority
> DESC, RAND()
lcr module only adds a single single quote before and after from uri:
q_len = snprintf(query, MAX_QUERY_SIZE, "SELECT %.*s.%.*s, %.*s.%.*s,
%.*s.%.*s, %.*s.%.*s, %.*s.%.*s, %.*s.%.*s FROM %.*s, %.*s WHERE '%.*s'
LIKE %.*s.%.*s AND '%.*s' LIKE CONCAT(%.*s.%.*s, '%%') AND %.*s.%.*s =
%.*s.%.*s ORDER BY CHAR_LENGTH(%.*s.%.*s), %.*s.%.*s DESC, RAND()",
-- juha
More information about the Users
mailing list