Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

From Mysql To Mssql

$
0
0
I have an application written in Yii where I've been developing towards a MySQL database. The queries can look something like this:

Quote

SELECT id FROM tbl_user


The queries are written using standard SQL so that the application can be run on any database, or at least so I thought.

Now I want to use it on MSSQL but am running into a problem where the queries are not being executed properly and generating errors. MSSQL is requiring me to have a syntax like this:

Quote

SELECT id FROM [database_name].[dbo].[tbl_user]


Is there any way for me to get around this without having to rewrite the SQL queries? Perhaps there is a setting in MSSQL or is there something in Yii which I can define?

Viewing all articles
Browse latest Browse all 18717

Trending Articles