Wiki articles in category Tips tagged with "database"

Showing 1-7 of 7 items.

Multi Data Provider

Created 6 years ago by Sharon Lavie, updated 4 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: 13 970 times
Version: 1.1
Category: Tips

How to catch and log MySQL deadlock errors

Created 8 years ago by seb, updated 8 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: 16 536 times
Version: 1.1
Category: Tips
Tags: database

Update two models with one view

Created 8 years ago by sensorario, updated 8 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: 48 995 times
Version: 1.1
Category: Tips

Use application on production/development environment without making changes

Created 8 years ago by ifdattic, updated 8 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: 66 225 times
Version: 1.1
Category: Tips

Guidelines for good schema design

Created 8 years ago by Steve Friedl, updated a year 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: 104 917 times
Version: 1.1
Category: Tips

A simple class to use a different db for a module

Created 9 years ago by tydeas_dr, updated 9 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: 25 356 times
Version: 1.1
Category: Tips

Getting nulls from database instead of empty strings

Created 9 years ago by samdark, updated 9 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: 15 968 times
Version: 1.1
Category: Tips
Tags: database, null