• 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
..
bin Loading commit data...
lib Loading commit data...
static Loading commit data...
templates Loading commit data...
.gitignore Loading commit data...
README Loading commit data...
crawlSave.tmp Loading commit data...
debugsf.tmp Loading commit data...
drump1.tmp Loading commit data...
drump2.tmp Loading commit data...
drump3.tmp Loading commit data...
example.log Loading commit data...
ff_extension Loading commit data...
logger.log Loading commit data...
mdmaug-launch Loading commit data...
mdmaug.py Loading commit data...
myfile Loading commit data...
nohupOld.out Loading commit data...
old_debugsf.tmp Loading commit data...
python.pem Loading commit data...
queue.cache Loading commit data...
save.p Loading commit data...
test.html Loading commit data...
test.xml Loading commit data...