[thelist] Difference between Cold Fusion 5 and MX?
Phillip M. Vector
phillipmvector at comcast.net
Thu Apr 8 02:33:18 CDT 2004
This code is supposto take each characters id and count how many resource
levels are stored on the table (I wanted to put a number quanity there, but
the processing was making my brain hurt).
Then it applies it to a formula and adds money to their account every day.
I have CFMX installed on my machine here and the following works great.
My server I actually run the page from keeps giving everyone the same amount
(It looks like the level of the last character checked).
So ... What do I need to change to get it to work with CF5?
===============================
<cfquery datasource="A6261_main_test" name="Richpeople"> select DISTINCT
Character_ID from Table_Backgrounds where Name = 'Resources'
</cfquery>
<cfloop Query="richpeople">
<cfoutput>
<cfquery datasource="A6261_main_test" name="resources"> select Character_ID
from Table_Backgrounds where Name = 'Resources' AND
Character_ID=#richpeople.Character_id#
</cfquery>
<cfset total = (((((#resources.recordcount# *
500)-498+(#randrange(0,6)#)-3)) *#days#)+ #character.moneyinbank#)>
<cfquery datasource="A6261_main_test">
update Table_Character
SET Moneyinbank = #total#, Last_Updated = #createodbcdate(now())# Where
Character_ID=#resources.Character_id#
</cfquery>
</cfoutput>
</cfloop>
More information about the thelist
mailing list