SQL: Difference between revisions

From MobileX for SageCRM
No edit summary
No edit summary
 
Line 1: Line 1:
This is an example of using SQL in a query and getting JSON back


   var visitId = SQLJSONSerializer.InsertOrUpdateRecord("Visit", visitJSON, "vsit_visitid",
   var visitId = SQLJSONSerializer.InsertOrUpdateRecord("Visit", visitJSON, "vsit_visitid",

Latest revision as of 15:38, 10 November 2016

This is an example of using SQL in a query and getting JSON back

 var visitId = SQLJSONSerializer.InsertOrUpdateRecord("Visit", visitJSON, "vsit_visitid",
 visit.vsit_visitid ? "vsit_visitid" : null);
 SQLJSONSerializer.ExecSQL(sql);
 var sql = "select * " +
       " from library " +
       " where {0}={1} order by 1 desc";
 sql = clr.System.String.Format(sql, libridfield, params.EntityId);
 var jsonResult = SQLJSONSerializer.ExecuteQueryToJSON(sql, false);
 Response.Write(jsonResult);