MySQL - master - slave |
The relation master - slave is MYSQL setup/configuration task, its not work for the framework..
MYSQL 5.5 Replication Docs > http://dev.mysql.com/doc/refman/5.5/en/replication.html Best VPS Hosting : Digital Ocean
What do you understand under Mysql Master - Slave ?
If its a Replication MYSQL service handles this relation. If its some kind of duplication with 2 instances you need to specify 2nd DB connection inside your app.. Best VPS Hosting : Digital Ocean
You can install mysqlnd extension and mysqlnd_ms plugin. It will transparently query slave(s) when needed so no code change is required in your app or CI.
More info here: http://php.net/manual/en/book.mysqlnd-ms.php
What about that?
(01-30-2016, 08:08 PM)siburny Wrote: You can install mysqlnd extension and mysqlnd_ms plugin. It will transparently query slave(s) when needed so no code change is required in your app or CI.yes I know that but in CI active record there is no option to add comments in query? Is there any option for this? (01-29-2016, 11:33 PM)sv3tli0 Wrote: What do you understand under Mysql Master - Slave ? you just do not get it
If you need to build your query with Query Builder for some reason, just use $this->db->get_compiled_select() (/_insert()/_update()/_delete()) to get the SQL generated by Query Builder, then pass it to $this->db->query() with your comments. For example:
PHP Code: $this->db->select('something')->from('somewhere'); If that doesn't work for some reason, you can try passing it to simple_query() instead of query().
(02-09-2016, 07:33 AM)mwhitney Wrote: If you need to build your query with Query Builder for some reason, just use $this->db->get_compiled_select() (/_insert()/_update()/_delete()) to get the SQL generated by Query Builder, then pass it to $this->db->query() with your comments. For example: I will try in this way, thanks ![]() |
Welcome Guest, Not a member yet? Register Sign In |