Posts

Query Alteration with Coldfusion using Query of Queries (QoQ)

Image
Using alteration in ColdFusion query we can be altered without effecting the identification of a cached query with QOQ. Original Query Output. After Alteration Query Output.

checkbox column on Server side processing and remember selected checkboxes and saving stage between pages

Image
Datatable serverside example following thease  1.Checkbox column on Server side processing  2.Remember selected checkboxes  3.Saving stage between pages  4.Get all the values of the checked checkboxes  5.Edit and Delete with serverside processing  6.Select All and UnSelect all checkboxes Screen 1 Screen 2

Create excel file using Cfspreadsheet

How to parse JSON in coldfusion

Parses the json object and displays the contents of its arrays using DeserializeJSON, This function is useful any time a ColdFusion page receives data as JSON strings. I Type Json: <cfoutput>     <cfset JsonData='[{"reason": "email address is unknown", "email": "abc@hotmail.comh"},     {"reason": "email address is unknown", "email": "bbc@68gmail.com"},     {"reason": "email address is unknown", "email": "ff@ff.com"},     {"reason": "Known bad domain", "email": "rr@hotmai.com"},     {"reason": "email address is unknown", "email": "ll@pp.rr.com"}]'>         <cfset JsonData=REReplace(JsonData,"^\s*[[:word:]]*\s*\(\s*","")>     <cfset JsonData=REReplace(JsonData, "\s*\)\s*$", "")>         <cfset cfData=DeserializeJ...

Insert multiple rows at a time in database

We can insert multiple rows in data using one query.It reduce the number of times execute requests. I Type : <Cfquery name="InsertReportDetails" datasource="TestDB">     INSERT INTO UserReporting(UserId,BatchId, ReportId)         SELECT #session.UserID#,2,1             UNION         SELECT #session.UserID#,2,2             UNION         SELECT #session.UserID#,2,3             UNION         SELECT #session.UserID#,2,4 </Cfquery> II Type : <Cfquery name="InsertReportDetails" datasource="TestDB">     INSERT INTO UserReporting(UserId,BatchId, ReportId)     VALUES       (#session.UserI...

Connect to database in php using class with constructor

PHP has different ways to connect to MySQL database. This is the example for Object oriented style when extending mysqli class.

Am Charts with Coldfusion Component

AmCharts with Coldfusion Component