Showing 61-80 of 373 items.

How to nest DB transactions without actually nesting them.

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top. 0 comments

To secure your database from inconsistencies resulting from failing (complex) operations, you (should) use transactions. However, complex methods often rely on other complex methods that themselves build on transactions. This HowTo presents a method to nest or embed transactions without relying on the database's nesting capabilities.

1 0
1
Viewed: 14 585 times
Version: 1.1
Category: How-tos

Use CGridview to sort and filter CSqlDataProvider - when used with UNRELATED tables (or complex queries)

Created 11 years ago by Gerhard Liebenberg Gerhard Liebenberg, updated 11 years ago by Gerhard Liebenberg Gerhard Liebenberg. 6 comments

I have two tables called hospitals and departments. I have a junction table between them which holds the departments in each hospital. But sometimes I need a list of "All hospitals with All possible departments" - regardless of whether they are linked in the junction table or not.

0 0
3
Viewed: 27 400 times
Version: 1.1
Category: How-tos

Yii configuration: Dynamic & User dependent

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top. 0 comments

It is difficult to perform user dependent theming through a general configuration in 'main.php'. This article proposes a method to do so through a Factory that dynamically generates classes to allow delayed resolution of actual user values. This means that you can refer to values that are stored in the database through the CActiveRecord before Yii is actually loaded. The values will be fetched...

1 0
1
Viewed: 16 302 times
Version: 1.1
Category: How-tos

How to hide /frontend/web in url addresses on apache

Created 11 years ago by raminious raminious, updated 11 years ago by jim. jim.. 17 comments

There is an issue on Yii2 to redirecting / urls to /frontend/web.
In other words we need a way to hidden /frontend/web from addresses.
We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

11 0
22
Viewed: 136 931 times
Version: 2.0
Category: How-tos

Behaviour for Time Zone and Format conversion for Date, Time, timestamp, and datetime

Created 11 years ago by Smithesh Smithesh, updated 10 years ago by Smithesh Smithesh. 1 comment

This Behaviour helps to view time/date/timestamp/datetime from db to local Date / Time / Date Time format and in local Timezone. And save into db in with db timezone and db format. You only need to include this behaviour in models where need this facility.