added support for reading from replicated databases
This commit is contained in:
parent
c39e7dc7b0
commit
7648c6c13f
24 changed files with 87 additions and 48 deletions
|
|
@ -513,7 +513,7 @@ A boolean indicating that the query should be read unconditionally. Defaults to
|
|||
sub setDataByQuery {
|
||||
my ($sth, $rowCount, @row);
|
||||
my ($self, $sql, $dbh, $unconditional) = @_;
|
||||
$dbh ||= $session{dbh};
|
||||
$dbh ||= WebGUI::SQL->getSlave;
|
||||
if ($unconditional) {
|
||||
$sth = WebGUI::SQL->unconditionalRead($sql,$dbh);
|
||||
return $sth->errorMessage if ($sth->errorCode > 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue