Wiki articles in category Tips tagged with "database"

Showing 1-7 of 7 items.

Multi Data Provider

Created 5 years ago by Sharon Lavie, updated 3 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: 12 545 times
Version: 1.1
Category: Tips

How to catch and log MySQL deadlock errors

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

Update two models with one view

Created 7 years ago by sensorario, updated 7 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 2
13 followers
Viewed: 46 702 times
Version: 1.1
Category: Tips

Use application on production/development environment without making changes

Created 7 years ago by ifdattic, updated 7 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: 61 538 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.

122 0
70 followers
Viewed: 98 704 times
Version: 1.1
Category: Tips

A simple class to use a different db for a module

Created 8 years ago by tydeas_dr, updated 8 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: 23 889 times
Version: 1.1
Category: Tips

Getting nulls from database instead of empty strings

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