• Edvard Rejthar's avatar
    Občas nefungovalo voting. · a2c7179f
    Edvard Rejthar authored
    Zjistil jsem, že to bylo, protože se použával (INNER) JOIN místo LEFT JOINu.
    Ale opravdu, opravdu jsem nepochopil, proč INNER JOIN nefungoval:
    
    
    SELECT status FROM `turris` AS t1
    left outer  JOIN `status` AS t2 ON (`t2`.`id` = `t1`.`status`)
    WHERE (`t1`.`remoteHost` = 'api.w.org') LIMIT 1 # vraci status = 1
    SELECT status FROM `turris` AS t1
    outer JOIN `status` AS t2 ON (`t2`.`id` = `t1`.`status`)
    WHERE (`t1`.`remoteHost` = 'api.w.org') LIMIT 1 # vraci status = 0. A to prestoze t1.status samo o sobe je rovno 1 (v tabulce status je pod id = 1 -> name = allow, místo name = n/a, které mi to házelo do prezentace.)
    a2c7179f
Name
Last commit
Last update
..
_layout.html Loading commit data...
_message.html Loading commit data...
crawl_view.py Loading commit data...
homepage.html Loading commit data...
sub.html Loading commit data...