added support for reading from replicated databases

This commit is contained in:
JT Smith 2004-07-09 21:10:58 +00:00
parent c39e7dc7b0
commit 7648c6c13f
24 changed files with 87 additions and 48 deletions

View file

@ -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);