Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Getting Started / October 2004



Tip: Looking for answers? Try searching our database.

Help with task

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TylerStonestreet - 24 Oct 2004 20:37 GMT
When reset happens.. if they are 10/15 HP... ((  hp/maxhp )) i want them to
revive completely to 15/15 sooo i tried doing

<cfquery name="battle" datasource="userlogin">
  SELECT * FROM battle
  WHERE user_id = '#session.user_id#'
</cfquery>
<cfoutput query="battle">

<cfquery datasource="userlogin">
  update Battle
     set hp = '#maxhp#'
</cfquery>

but doesnt work - what can i do
Adam Cameron - 24 Oct 2004 20:49 GMT
What do you mean by "doesn't work"? What  *does* happen?

And don'ty you want some sort of WHERE clause on your UPDATE query?

Adam
Adam Cameron - 27 Oct 2004 00:31 GMT
So there  are no error messages, nothign added to the logs , and no indication
that the task actually ran?  NO updates happening in the DB (obviously)?

So is the issue that your update doesn't work, or that the scheduled task
doesn't run?

You're not giving us much to go on here.

What happens if - instead of running it as a task - you just browse to the
relevant URL?

If that works, maybe add some loggign to the template, to see if it's even
being run.

Adam
TylerStonestreet - 28 Oct 2004 00:12 GMT
okay.. basically there is something wrong with my

<cfquery name="battle" datasource="userlogin">
SELECT * FROM battle
WHERE user_id = '#session.user_id#'
</cfquery>
<cfoutput query="battle">

<cfquery datasource="userlogin">
update Battle
set hp = '#maxhp#'
</cfquery>

so if i have a table BATTLE with:

HP
and MAXHP...

all i need to know is how would i write a query that sets the hp as the max
hp....
Adam Cameron - 28 Oct 2004 00:55 GMT
Well, based on the info given: there's nothing wrong with it.

Have you got debugging switched on?  Is it reporting *nothing* of relevance?  
What does the query debugging say?

Is the first query returning anything?

Is the session.user_id populated with what you'd expect?

You must have done SOME of your own troublehsooting, beyond "it doesn't work",
and just staring @ it?

Adam
TylerStonestreet - 29 Oct 2004 20:43 GMT
Yes I did, and saw nothing wrong with it, nor did coldfusion, hence why i
posted.  Being as i have never sceduled a tast before, i didn't know if you
were allowed querys, or if they just did updates, or whatnot , considering it
works when i load the page.. just not when it is loaded in admin.
Adam Cameron - 30 Oct 2004 00:35 GMT
For goodness sake!

- Have you got debugging switched on?  Is it reporting *nothing* of
relevance?  
What does the query debugging say?

- Is the first query returning anything?

- Is the session.user_id populated with what you'd expect?

WE CAN'T HELP YOU UNLESS YOU GIVE US SOME MORE INFORMATION!

Adam
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.