Default date format in Oracle is DD-MON-RR (25-JAN-18). With that output, we can't using date formatting.
Default date format in Oracle is DD-MON-RR (25-JAN-18). With that output, we can't using date formatting.
One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.
Simple Yii Script for performing CRUD operations:
According to below wiki we could migrate database schema to another database
Suppose we want to set a category to product (or an item in general term), Also suppose categories has sub-categories (multi-level)
Note the tag {{homeUrl}}
will be dynamically replaced at runtime.
The classic Yii way for doing an update action is as follows:
Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).
create a class file under protected\components named RActiveRecord.php
To extend further static pages as shown by Qiang http://www.yiiframework.com/wiki/22/how-to-display-static-pages-in-yii/ here're the steps to take:
This is a tutorial for how to auto set model values without any code.
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.
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).
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.
This is an incipient implementation of application-driven database with Yii.
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.
I used another example posted here a while back where the person was modifying the index.php and adding in a switch case for different domains and loading separate config files. This was actually too much for me, because all my portals are the exact same (as far as routes, modules, extensions, etc) and if I ever wanted to add another route it wouldn't be feasible opening up all the config files t...
Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field...
What would you do if you want/need to have a different than the main database connection in an module's models?
To get null
from database instead of empty strings you need to set up your DB connection as follows: