Skip to content

Instantly share code, notes, and snippets.

View gratzc's full-sized avatar

Curt Gratz gratzc

View GitHub Profile
SELECT country, city, META().id
FROM `travel-sample` use index (ixtypectcy)
WHERE type = "hotel"
AND country >= “France”
AND city >= “Avignon”
AND META().id > "038c8a13-e1e7-4848-80ec-8819ff923602"
ORDER BY country, city, META().id
LIMIT 10;
SELECT country, city, META().id
FROM `travel-sample` use index (ixtypectcy)
WHERE type = "hotel"
AND country >= 0
AND city >= 0
AND META().id > 0
ORDER BY country, city, META().id
LIMIT 10;
CREATE INDEX ixtypectcy ON `travel-sample` (type, country, city, META().id);
SELECT *
FROM `travel-sample`
WHERE type = ‘hotel’
ORDER BY country, city
OFFSET 1000000
LIMIT 10;
SELECT *
FROM `travel-sample`
WHERE type = ‘hotel’
ORDER BY country, city
OFFSET 10
LIMIT 10;
SELECT *
FROM `travel-sample`
WHERE type = ‘hotel’
ORDER BY country, city
OFFSET 0
LIMIT 10;
update offerBidderInfo
set bidCount = (select count(*) from ss_bids with (nolock) where offer_id = @offerID and retracted_by_buyer = 'N' and deleted = 'N'),
highBidAmount = b.highBid,
highBidID = b.id,
highBidderID = b.user_id,
proxyBidAmt = b.proxyBidAmount,
bidIncrementAmt = dbo.UDF_CALC_BID_INCREMENT_FROM_OFFERID(@offerID),
updateDate = getdate(),
commission_amt = dbo.udf_calc_commission(@offerID),
transaction_amt = dbo.udf_get_transaction_amount(@offerID, 'F'),
CREATE TABLE #sp_who2
(
SPID INT,
Status VARCHAR(MAX),
LOGIN VARCHAR(MAX),
HostName VARCHAR(MAX),
BlkBy VARCHAR(MAX),
DBName VARCHAR(MAX),
Command VARCHAR(MAX),
CPUTime INT,
<!--- faqs event used to get Question/Answer sets for the grid in our Admin --->
<cffunction name="faqs" returntype="void" output="false" hint="I return the data struct of faqs for the grid">
<cfargument name="event" type="any" required="yes">
<cfargument name="rc" type="any" required="yes">
<cfargument name="prc" type="any" required="yes">
<cfscript>
var offset = ((rc.page-1)*rc.rows);
var sortOrder = rc.sidx & " " & rc.sord;
var qry = variables.FaqService.list(criteria={componentId=rc.componentID},offset=offset,max=rc.rows,sortOrder=sortOrder);
var count = variables.FaqService.count("componentID=#rc.componentID#");
<cfif thisTag.executionMode is "start">
<cfsilent>
<!------------------------------------------------------------------------
Author : Curt Gratz
Date : 7/9/2010
Description :
Custom tag to render script sections of the jqGrid.
Needs to be inside
$(document).ready(function(){
)};