mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-04 19:58:39 +00:00
test fixes
This commit is contained in:
parent
5a1ea1ee49
commit
a4f7d2e527
|
|
@ -60,6 +60,6 @@ class MysqlGrammar extends Grammar
|
||||||
$expression = '*';
|
$expression = '*';
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'SELECT ' . $expression . ' ' . $this->compileFrom($query, $query->from) . ' ' . $this->compileWheres($query, $query->wheres) . ' ORDER BY \rand() ' . $this->compileLimit($query, $query->limit ?? 1);
|
return 'SELECT ' . $expression . ' ' . $this->compileFrom($query, $query->from) . ' ' . $this->compileWheres($query, $query->wheres) . ' ORDER BY RAND() ' . $this->compileLimit($query, $query->limit ?? 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,17 @@ final class Algebra
|
||||||
$temp += $value1[$i][$c] * $value2[$c];
|
$temp += $value1[$i][$c] * $value2[$c];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$result[$i] = $temp;
|
||||||
|
}
|
||||||
|
} elseif (!$isMatrix1 && $isMatrix2) {
|
||||||
|
$result = [];
|
||||||
|
for ($i = 0; $i < $m1; ++$i) { // Row of 1
|
||||||
|
$temp = 0;
|
||||||
|
|
||||||
|
for ($c = 0; $c < $m2; ++$c) { // Row of 2
|
||||||
|
$temp += $value2[$i][$c] * $value1[$c];
|
||||||
|
}
|
||||||
|
|
||||||
$result[$i] = $temp;
|
$result[$i] = $temp;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user