ADODB_mysqli using replication for AJAX etc (v9)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
kartano
User
Posts: 33

ADODB_mysqli using replication for AJAX etc (v9)

Post by kartano »

I'm using PHPMaker 9.2.0, registered version.

We have a cluster setup with a replication server for fast lookups (read-only). Is there a way I can adjust the ADODB_mysqli class so that it will determine if the connection is being used for AJAX/lookups and thus redirect the connection to our replication server?


Webmaster
User
Posts: 9430

Post by Webmaster »

Use Database_Connecting server event (see Server Events and Client Scripts in the help file) to change connection info, e.g.

if ($GLOBALS["lookup"]) { // $lookup exists, i.e. the page is ewlookup10.php
// change the connection info
}


Post Reply