Wiki articles in category Tips tagged with "database"

Showing 1-7 of 7 items.

Multi Data Provider

Created 12 years ago by Sharon Lavie Sharon Lavie, updated 10 years ago by Sharon Lavie 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: 20 707 times
Version: 1.1
Category: Tips

How to catch and log MySQL deadlock errors

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

Getting nulls from database instead of empty strings

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

Use application on production/development environment without making changes

Created 14 years ago by ifdattic ifdattic, updated 14 years ago by ifdattic 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: 79 772 times
Version: 1.1
Category: Tips

A simple class to use a different db for a module

Created 14 years ago by tydeas_dr tydeas_dr, updated 14 years ago by Maurizio Domba Cerin 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: 32 156 times
Version: 1.1
Category: Tips

Update two models with one view

Created 14 years ago by sensorario sensorario, updated 13 years ago by SebK 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: 58 990 times
Version: 1.1
Category: Tips

Guidelines for good schema design

Created 14 years ago by Steve Friedl Steve Friedl, updated 7 years ago by softark 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: 129 492 times
Version: 1.1
Category: Tips