Well I started with PHP so it's a bit different - actually, I think I started with ASP but gave up on that almost straight away - but yeah, when I stumbled upon CF in 2002, after a couple of years of doing PHP, I switched over pretty quickly. It's just makes more sense and is easier to get on with.
Railo goes a step further, adding cool improvements, and (as a company) being far more interactive with the community than Adobe (which isn't surprising; Adobe only really cares about Photoshop/Flash/PDFs/etc, and mostly treats CF as a big cash cow).
Anyway... (kiss)
You guys are terrible!
:-O
(flower)
I am so pumped. I have the first form automated. That will save so much time it's unreal. There is so much room for process improvement here and this is going to be a big part of it!
Using CF I was able to grab the variables I needed that somehow eluded me using PHP.
Thanks Pete for making me aware of Railo!
SELECT * FROM ProductionHeader WHERE ruhID='041811BD'; SELECT ID=rudID, Category=rudCategory, Seq=rudSeq, Type=rudType, [Product ID]=rudProductID, Description=rudDescrip, PcsPerPkg=rudPcsPerPkg, Tally=rudTally, UOM=rudBaseUnitID, Pieces=rudPieces, Volume=rudVolume, NetVolume=rudNetVolume, Cost=rudCost, AddedCost= rudAddedCost, MktValue=rudMarketValue, Total=rudTotal, NetThick=rudNetThick, NetWidth=rudNetWidth, NetLength=rudNetLength, NetType=rudVolType, LocationID=rudLocationID,rudFIFOVolume,rudForceCost,rudBoomID,prdLengthID=(SELECT prdLengthID FROM ProductMaster WHERE prdID=rudProductID) FROM ProductionDetail WHERE rudID='041811BD' AND rudCategory='Consumed' ORDER BY Seq; SELECT ID=rudID, Category=rudCategory, Seq=rudSeq, Type=rudType, [Product ID]=rudProductID, Description=rudDescrip, PcsPerPkg=rudPcsPerPkg, Tally=rudTally, UOM=rudBaseUnitID, Pieces=rudPieces, Volume=rudVolume, NetVolume=rudNetVolume, Cost=rudCost, AddedCost= rudAddedCost, MktValue=rudMarketValue, Total=rudTotal, NetThick=rudNetThick, NetWidth=rudNetWidth, NetLength=rudNetLength, NetType=rudVolType, LocationID=rudLocationID,rudFIFOVolume,rudForceCost,rudBoomID,prdLengthID=(SELECT prdLengthID FROM ProductMaster WHERE prdID=rudProductID) FROM ProductionDetail WHERE rudID='041811BD' AND rudCategory='Produced' ORDER BY Seq; SELECT uft.uftDocId, uft.uftFieldType, uft.uftValidation, Description = uft.uftCaption, Value = duf.dufValue FROM UserFieldTemplate uft LEFT JOIN DocumentUserFields duf ON duf.dufDocType = uft.uftDocType AND duf.dufSeq = uft.uftDocId AND duf.dufDocId='041811BD' WHERE uft.uftDocType='PRODUCTION' ORDER BY uft.uftDocId; SELECT ufvDocId, ufvSeq, Value=ufvValue, Description=ufvDescrip FROM UserFieldValues WHERE ufvDocType='PRODUCTION' ORDER BY ufvDocId, ufvSeq; SELECT dufDocType, dufDocID, dufSeq, dufValue FROM DocumentUserFields WHERE 1=0; SELECT * ,tagParentProdID=ISNULL((SELECT MAX(p2.prdID) FROM ProductMaster p2 WHERE p1.prdThickID=p2.prdThickID AND ((isnull(p2.prdWidthID,'')='' AND isnull(tagHdrWidthID,'')='') or isnull(p2.prdWidthID,'')=tagHdrWidthID) AND ISNULL(p2.prdLengthID,'') = ISNULL(p1.prdLengthID,'') AND p1.prdSpeciesID=p2.prdSpeciesID AND p1.prdGradeID=p2.prdGradeID AND p1.prdSurfacingID=p2.prdSurfacingID AND p1.prdStateID=p2.prdStateID AND ISNULL(p1.prdUsrAttribID,'')=ISNULL(p2.prdUsrAttribID,'') AND ISNULL(p1.prdUsrAttribID2,'')=ISNULL(p2.prdUsrAttribID2,'') AND ISNULL(p1.prdUsrAttribID3,'')=ISNULL(p2.prdUsrAttribID3,'') AND ISNULL(p1.prdUsrAttribID4,'')=ISNULL(p2.prdUsrAttribID4,'') AND ISNULL(p1.prdUsrAttribID5,'')=ISNULL(p2.prdUsrAttribID5,'') AND ISNULL(p1.prdUsrAttribID6,'')=ISNULL(p2.prdUsrAttribID6,'') AND ISNULL(p1.prdUsrAttribID7,'')=ISNULL(p2.prdUsrAttribID7,'') AND ISNULL(p1.prdUsrAttribID8,'')=ISNULL(p2.prdUsrAttribID8,'') AND ISNULL(p1.prdUsrAttribID9,'')=ISNULL(p2.prdUsrAttribID9,'') AND p1.prdHidden=1),p1.prdID) FROM TagMaster INNER JOIN ProductMaster p1 ON p1.prdID=tagProductID WHERE tagSourceID='041811BD' AND tagSourceType='PRODUCTION' ORDER BY tagID,tagLineSeq; SELECT ProductID=rudProductID, LocationID=rudLocationID, Volume=SUM(rudVolume), Type=rudType FROM ProductionDetail WHERE rudID='041811BD' AND rudProductID<>'' AND rudCategory='Produced' AND rudType='Vol' GROUP BY rudProductID, rudLocationID, rudType; SELECT ProductID=rudProductID, LocationID=rudLocationID, Value=SUM(rudTotal), Type=rudType, rudCategory FROM ProductionDetail WHERE rudID='041811BD' AND rudProductID<>'' GROUP BY rudProductID, rudLocationID, rudType, rudCategory; SELECT 1 FROM DocumentNotesMaster WHERE dnmDocType='PRODUCTION' AND dnmDocID='041811BD'; SELECT DocType=dcmDocType, DocID=dcmDocID, Seq=dcmSeq, Type=dcmCostTypeID, Description=dcmDescrip, MachineID=dcmMachineID, SuppID=dcmSuppID,FundsID=dcmFundsTypeID, FundsRate=dcmFundsRate, Qty=dcmQty, CostRate=dcmRateID, Total=dcmTotal, Prorate=dcmProrate, ProductID=dcmProductID, [LineNo]=dcmLineNo FROM DocumentCostMaster WHERE dcmDocType='PRODUCTION' AND dcmDocID='041811BD' ORDER BY dcmSeq
=ISNULL(p2.prdUsrAttribID,'') AND ISNULL(p1.prdUsrAttribID2,'')=ISNULL(p2.prdUsrAttribID2,'') AND ISNULL(p1.prdUsrAttribID3,'')=ISNULL(p2.prdUsrAttribID3,'') AND ISNULL(p1.prdUsrAttribID4,'')=ISNULL(p2.prdUsrAttribID4,'') AND ISNULL(p1.prdUsrAttribID5,'')=ISNULL(p2.prdUsrAttribID5,'') AND ISNULL(p1.prdUsrAttribID6,'')=ISNULL(p2.prdUsrAttribID6,'') AND ISNULL(p1.prdUsrAttribID7,'')=ISNULL(p2.prdUsrAttribID7,'') AND ISNULL(p1.prdUsrAttribID8,'')=ISNULL(p2.prdUsrAttribID8,'') AND ISNULL(p1.prdUsrAttribID9,'')=ISNULL(p2.prdUsrAttribID9,'')
Post.destroy_all :user => User.find_by_email("andy@caerphoto.com")