Wiki articles in category Tips tagged with "database"

Showing 1-7 of 7 items.

Multi Data Provider

Created 8 years ago by Sharon Lavie, updated 5 years ago by Sharon Lavie.

Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).

1 0
4 followers
Viewed: 15 276 times
Version: 1.1
Category: Tips

How to catch and log MySQL deadlock errors

Created 9 years ago by seb, updated 9 years ago by seb.

This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.

4 0
7 followers
Viewed: 18 136 times
Version: 1.1
Category: Tips
Tags: database

Update two models with one view

Created 9 years ago by sensorario, updated 9 years ago by SebK.

Suppose to have two models: Users and Emails. You do not want to store email in a Users model. And User can have 0 or many emails. This is the form generated to create a new user (just username).

9 3
13 followers
Viewed: 51 344 times
Version: 1.1
Category: Tips

Use application on production/development environment without making changes

Created 9 years ago by ifdattic, updated 9 years ago by ifdattic.

I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

8 1
11 followers
Viewed: 70 882 times
Version: 1.1
Category: Tips

Guidelines for good schema design

Created 10 years ago by Steve Friedl, updated 3 years ago by softark.

Virtually all Yii applications are built on top of a database, and though Yii is very flexible in how it addresses your DB, some design choices make things more convenient than others.

124 0
71 followers
Viewed: 110 143 times
Version: 1.1
Category: Tips

A simple class to use a different db for a module

Created 10 years ago by tydeas_dr, updated 10 years ago by Maurizio Domba Cerin.

What would you do if you want/need to have a different than the main database connection in an module's models?

8 0
12 followers
Viewed: 26 813 times
Version: 1.1
Category: Tips

Getting nulls from database instead of empty strings

Created 10 years ago by samdark, updated 10 years ago by samdark.

To get null from database instead of empty strings you need to set up your DB connection as follows:

13 0
11 followers
Viewed: 17 702 times
Version: 1.1
Category: Tips
Tags: database, null