Project

General

Profile

« Previous | Next » 

Revision 2123

sql.py: mk_select(): Joins: Reversed order of left_col and right_col so the column of the table being joined is first, to match the form of a WHERE clause

View differences:

lib/sql.py
363 363
            left_col, right_col = entry
364 364
            left_col = left_table+'.'+esc_name_(left_col)
365 365
            right_col = table+'.'+esc_name_(right_col)
366
            return (left_col+' = '+right_col
367
                +' OR ('+left_col+' IS NULL AND '+right_col+' IS NULL)')
366
            return (right_col+' = '+left_col
367
                +' OR ('+right_col+' IS NULL AND '+left_col+' IS NULL)')
368 368
        
369 369
        query += ' JOIN '+table+' ON '+(
370 370
            ' AND '.join(map(join, joins.iteritems())))

Also available in: Unified diff