Tuesday, July 23, 2013

Combine two columns value into one column using MSSQL

if want to select two column value in one culumn using MSSQL then you have to write below query

SELECT (column1+column2) AS columnName
FROM table


To add '-' beween value of these two column

SELECT (column1+ ' - ' + column2) AS columnName
FROM table

Tuesday, July 16, 2013

Edit CakePhp .ctp file in Dreamweaver

Dreamweaver does not understand what the .ctp file extension is, and how should it syntax highlight the code.  So we help Dreamweaver out by editing a few of its configuration files. Below is step by step guide :
1.      “Edit dreamweaver configuration file located at C:\Program Files\Macromedia\Dreamweaver 8\Configuration\Extensions.txt “and alter 2 lines by adding the CTP file extension as follows:
VTML,INC,JAVA,EDML,WML,CTP:All Documents
All document file line should look as above at the end.

PHP,PHP3,PHP4,PHP5,TPL,CTP:PHP Files
The PHP Files line, which was line 16 for me, should look as above.

2.      No we do same as above in configuration file located at
IN Windows xp:
C:\Documents and Settings\{user}\Application Data\Adobe\Dreamweaver 9\Configuration\Extensions.txt
In Windows 7:
“C:\Users\\AppData\Roaming\Adobe\Dreamweaver 9\Configuration\Extensions.txt
3.      Edit another configuration file located at “C:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration\DocumentTypes\MMDocumentTypes.xml”. What we are looking for is around the 75th line where it reads “servermodel=PHP MySQL”.
winfileextension="php,php3,php4,php5,ctp"
macfileextension="php,php3,php4,php5.ctp"
Add the ctp extension to the comma separated list as shown above.