CFMAILing a FILE input
Hi guys. I'm still a noob. So I've got this form, and I'm CFMAILING it somewhere. The form has a FILE input field, for adding a photo. I'd like it to attach the photo to the CFMAIL. You know, send the photo as an attachment. How do I do that in the CFMAIL tag? Thanks CK! ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217911 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Noob: getting a total from some CFOUTPUTted fields
Hey list! How's it going? My first app is running now. I couldn't have done it without everybody's help! Thanks to all. Perhaps I will eventually become a useful member myself. Now, in my app I have a CFOUTPUT that displays table rows like this: CUSTOMER PRODUCT ORDER VALUE #customer##product##order_value# I'd like to have a TOTAL field at the bottom of the table, that displays the sum of all the CFOUTPUTted #order_values#. Is this very difficult? This is what I'd like to see: CUSTOMERPRODUCTORDER VALUE Tom Apple 100 Dick Banana 200 -- TOTAL 300 How do I calculate the total? Thanks in advance, CK. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211390 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Noob: getting a total from some CFOUTPUTted fields
:) thanks guys! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211395 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
rookie: link table
Dear list, My task management app gets a list of tasks, like so: -- CFQUERY name=get_tasks datasource=taskomatic SELECT tasks.task_id, tasks.name AS taskname, tasks.deadline, tasks.project_id, tasks.importance_id, tasks.owner_id, tasks.lead_time, tasks.status_id, projects.project_id, projects.name AS projectname, projects.colour, projects.company_id, people.person_id, people.name AS ownername, importance.importance_id, importance.importance AS importancename, FROM tasks JOIN projects ON tasks.project_id = projects.project_id JOIN people ON tasks.owner_id = people.person_id JOIN importance ON tasks.importance_id = importance.importance_id WHERE tasks.status_id = 1 CFIF Session.company_id neq 0 !--- this is the bit i need help with--- /CFIF ORDER BY #order# /CFQUERY -- What I'd like to happen is that: if the session variable company_id is not 0, it only gets TASKS that belong to the PROJECT that the PERSON is cleared for. My link table is called PEOPLE_PROJECT and it has two columns: -- person_id | project_id -- There is a tasks.project_id and of course a project.project_id (and a people.person_id if that's relevant). How do I do this? I can't seem to get my head around it. Many thanks! CK. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201369 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: OT rookie: link table
people.person_id hahahahahhahahhahhhaahaha.ah. sigh. sorry Chris, back to the topic. :| uh? I love it when I'm funny but it's a bit disconcerting when I don't know why. it only gets TASKS that belong to the PROJECT that the PERSON is cleared for Im not sure how you are defining cleared for, but it should just be a couple more Inner Joins? Well i have a Session.person_id. I should be able to compare that somehow with the table people_project (which is a combination of person_id and project_id), and thereby find out which project(_id)(s) match which the logged in person(_id), right? Thanks! CK. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201382 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
[SOLVED] Re: OT rookie: link table
Many thanks, guys, that now works perfectly. Kind regards, CK. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201401 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
help-a-noob: Null Pointers
Hello list! It's 12.47pm and I didn't go to sleep last night. Thank the goddess for illegal stimulants. So I'm bashing my exhausted head on the desk with this error message: -- The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Null Pointers are another name for undefined values. The error occurred in /Applications/JRun4/servers/cfmx/cfusion-ear/cfusion-war/CFIDE/ taskomatic/viewtasks.cfm: line 149 147 : /tr 148 : CFOUTPUT query=get_tasks 149 : CFSET diff = DateDiff(d, Now(), #deadline#) 150 : tr 151 : td width=16 -- I think this is the problem code: -- CFOUTPUT query=get_tasks CFSET diff = DateDiff(d, Now(), #deadline#) tr td width=16 CFIF get_tasks.status_id IS 1 a href=viewtasks.cfm? insert=closetasktask_id=#task_id#status_id=2img src=images/done_false.gif border=0/a CFELSE a href=viewtasks.cfm? insert=closetasktask_id=#task_id#status_id=1img src=images/done_true.gif border=0/a /CFIF /td tda href=edittask.cfm?task_id=#task_id#CFIF get_tasks.status_id IS 2strike/CFIFfont color=#colour##taskname#/fontCFIF get_tasks.status_id IS 2/strike/CFIF/a/td tdfont color=#colour##projectname#/font/td td CFIF get_tasks.status_id IS 1 CFIF diff LTE lead_time * 2 AND diff GT lead_time bgcolor=##CBFDD4 CFELSEIF diff IS lead_time bgcolor=##99 CFELSEIF diff LT lead_time bgcolor=##E5BF8C /CFIF /CFIF div align=centerCFIF get_tasks.status_id IS 2strike/CFIF#dateformat(deadline)#/div/td tddiv align=center#importancename#/div/td td#ownername#/td /tr /CFOUTPUT -- But maybe I'm wrong, here is the whole page: _ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 titleTaskomatic/title CFPARAM name=insert default=false CFPARAM name=order default=deadline !--- BEGIN CFSWITCH SECTION --- CFSWITCH expression=#insert# CFCASE value=task CFINSERT datasource=taskomatic tablename=tasks formfields=task_id, project_id, owner_id, status_id, importance_id, name, deadline, lead_time, notes /CFCASE CFCASE value=updatetask CFUPDATE datasource=taskomatic tablename=tasks formfields=task_id, project_id, owner_id, status_id, importance_id, name, deadline, lead_time, notes /CFCASE CFCASE value=deletetask cfquery datasource=taskomatic DELETE FROM tasks WHERE task_id='#task_id#' /cfquery /CFCASE CFCASE value=closetask CFQUERY NAME=close_task datasource=taskomatic UPDATE tasks SET status_id = #status_id# WHERE task_id = #task_id# /CFQUERY /CFCASE /CFSWITCH !--- END CFSWITCH SECTION--- !--- BEGIN QUERY SECTION --- CFQUERY name=get_tasks datasource=taskomatic SELECT tasks.task_id, tasks.name AS taskname, tasks.deadline, tasks.project_id, tasks.importance_id, tasks.owner_id, tasks.lead_time, tasks.status_id, projects.project_id, projects.name AS projectname, projects.colour, people.person_id, people.name AS ownername, importance.importance_id, importance.importance AS importancename FROM tasks JOIN projects ON tasks.project_id = projects.project_id JOIN people ON tasks.owner_id = people.person_id JOIN importance ON tasks.importance_id = importance.importance_id WHERE tasks.status_id=1 ORDER BY #order# /CFQUERY CFQUERY name=get_done_tasks datasource=taskomatic SELECT tasks.task_id, tasks.name AS taskname, tasks.deadline, tasks.project_id, tasks.importance_id, tasks.owner_id, tasks.lead_time, tasks.status_id, projects.project_id, projects.name AS projectname, projects.colour, people.person_id, people.name AS ownername, importance.importance_id, importance.importance AS importancename FROM tasks JOIN projects ON
[SOLVED] Re: help-a-noob: Null Pointers
And seconds after crying for help, I realised what it was: a null field in my backend database that can't be null. I know, I know. I'm very tired, okay? Sorry to waste everybody's bandwidth. Best regards, CK. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200121 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
A newbie approaches user authentication
Dear list, So, my first app is finished - except for user authentication. I thought I'd save the most difficult bit until the end. I guess CFLOGIN is the way to go, so I took a look at this tutorial: http://tutorial67.easycfm.com/ and, to my shame, didn't really understand it. I was doing okay until the bit about creating a security object that contains all the methods of the security component by using the createobject function to invoke security.cfc. Can anyone either (a) point me to a simpler user authentication method, or (b) help me understand that above stuff? Many grateful thanks in advance, CK. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:194469 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
My CFSET error
Hi List, This CFSET is returning the error: Variable DIFFTYPE is undefined. -- CFOUTPUT query=get_tasks CFSWITCH EXPRESSION=lead_time_type_id CFCASE VALUE=1CFSET difftype=n/CFCASE CFCASE VALUE=2CFSET difftype=h/CFCASE CFCASE VALUE=3CFSET difftype=d/CFCASE CFCASE VALUE=4CFSET difftype=ww/CFCASE /CFSWITCH CFSET diff = DateDiff(#difftype#, Now(), #deadline#) /CFOUTPUT -- :/ Can anybody see what I'm doing wrong? Thanks guys, CK. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192578 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
SOLVED: My CFSET error
Thanks everybody, this was the problem exactly: Your switch expression is the text lead_time_type_id which does not have a case. If you mean it to be a variable of that name, you have to place pound sighs around the variable. Like so: CFSWITCH EXPRESSION=#lead_time_type_id# ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192592 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFUPDATE throwing up a weird error
Name may be a reserved word depending on your DB Thanks very much, Bryan, but that doesn't seem to be the problem. I renamed the field to banana, and it still doesn't work. I'm kind of stumped. Anyone else got any ideas? I will take your other advice about learning more SQL, but just so I know, what's wrong with CFUPDATE CFINSERT? Thanks! CK. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192684 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
CFUPDATE-ing without a form
Dear list, I have a URL variable like so: a href=viewtasks.cfm? insert=closetasktask_id=#task_id#status_id=2change status to 2/a Going to a CFUPDATE like so: CFSWITCH expression=#insert# CFCASE value=closetask CFUPDATE datasource=taskomatic tablename=tasks formfields=task_id, status_id /CFCASE /CFSWITCH I was hoping it'd change the relevant status_id to 2, but no, it doesn't seem to do anything. Not even give me an error message. Can anybody help? Is it because the FORMFIELDS aren't actually coming from a form? Thanks in advance, CK. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192717 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Too stupid for CF
Dear list, In my task management system, certain people have access to certain projects. I'd like an admin screen for each project that displays all the people with a checkbox beside their name. The sysad can check or uncheck people as necessary. But I'm a bit confused how best to execute this (using MySQL and CF). My first thought was that each project would have its own table in the backend. It'd have one column that would contain all the person_ids. PROJECT IHATECODING --- 01 04 06 So users 01, 04, and 06 would have access to project ihatecoding. But of course I can't do this because users can create projects on the fly. So I made a table that combined project_ids and person_ids: PROJ_ID | PERS_ID 01 | 03 01 | 05 02 | 03 But how the hell do I update this using CF? Do I CFINSERT or CFUPDATE or what? And how do I tell my app to remove people when they're unchecked? This is killing me. I feel like I can almost see how this is supposed to work but I'm like three IQ points short of getting it. :( Grateful thanks in advance for any help and insights, CK. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192329 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Attribute validation error for tag cfloop
Dear list, I'm getting this error message: -- Attribute validation error for tag cfloop. The value of the attribute query, which is currently insert_people, is invalid. -- I guess there's something wrong with my INSERT statement but I can't figure out what it is. I've tried permutations for the VALUEs with s, 's, no quotes, double #s, but it still doesn't seem to work. Here's my code: -- titleTaskomatic/title CFQUERY DATASOURCE=taskomatic DELETE FROM people_project WHERE project_id = '#project_id#' /CFQUERY CFQUERY NAME=insert_people DATASOURCE=taskomatic INSERT INTO people_project VALUES ('#person_id#', '#project_id#') /CFQUERY /head body h1Access list updated /h1 CFLOOP QUERY=insert_people CFOUTPUT#person_id#br/CFOUTPUT /CFLOOP /body ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192365 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
CFLOOP not looping
Dear list, My CFLOOP doesn't seem to be looping my INSERTS. A form passes the variables #person_id# #project_id# to this page: head CFQUERY NAME=get_people DATASOURCE=taskomatic SELECT person_id FROM people WHERE person_id = '#Form.person_id#' /CFQUERY /head body CFLOOP QUERY=get_people CFQUERY NAME=insert_records DATASOURCE=taskomatic INSERT INTO people_project (person_id, project_id) VALUES ('#Form.person_id#', '#Form.project_id#') /CFQUERY /CFLOOP /body -- When there are multiple #person_id#s, I was hoping the CFLOOP would create multiple rows in the table. But it doesn't. :/ What am I doing wrong this time? Many thanks, CK. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192384 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFLOOP not looping
On 31 Jan 2005, at 7:12 pm, Charlie Griefer wrote: are you sure your query is returning records? do a cfoutput#get_people.recordcount#/cfoutput after your /cfquery to make sure. Ah! Now we're getting somewhere. No: when I check multiple boxes on the form that gets me here, it sends one value, like this: 1,7 Which begs the question: how do I make it send separate values? Then I think my CFLOOP might work. 1 7 -- head CFQUERY NAME=get_details DATASOURCE=taskomatic SELECT projects.name AS projectname, projects.company AS projectcompany, people.person_id, people.name AS personname, people.company AS personcompany FROM projects JOIN people ON projects.company = people.company WHERE projects.project_id = #project_id# /CFQUERY /head form CFOUTPUT QUERY=get_details input name=person_id type=checkbox value=#person_id##personname#/p /CFOUTPUT /form ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192397 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
SOLVED: CFLOOP not looping
:D it now loops. The IN clause fixed it. Thanks everybody. - ck. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192399 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Calculating lead time
Dear List, So tasks in my task management system include these fields: deadline(date - MySQL date) leadtime(number - MySQL tinyint) leadtime_type (minutes, hours, days, weeks - MySQL varchar) On the task list view (an html table), I'd like the table rows to change colour based on how close the deadline is. - If the deadline is more than twice the lead time away - no bgcolor (or class) - Between 1 and 2 lead times - bgcolor green - Within the lead time - bgcolor yellow - Past the deadline - bgcolor red Is this possible? What functions should I investigate? Kind regards, CK. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192440 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Variable is not defined
Dear list, How do I set a variable to null (or no or something) if it's not already defined? Thanks! CK. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192185 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
basic: outputting data from several tables in one CFOUTPUT
Dear list, I've got this query that gets data from three tables: CFQUERY name=get_tasks datasource=taskomatic SELECT tasks.task_id, tasks.name, tasks.deadline, tasks.project_id, tasks.importance_id, tasks.owner_id, projects.project_id, projects.name, people.person_id, people.name, importance.importance_id, importance.importance FROM tasks JOIN projects ON tasks.project_id = projects.project_id JOIN people ON tasks.owner_id = people.person_id JOIN importance ON tasks.importance_id = importance.importance_id /CFQUERY But the trouble is, the CFOUTPUT I thought would work doesn't: CFOUTPUT query=get_tasks td#tasks.name#/td td#projects.name#/td td#tasks.deadline#/td td#importance.importance#/td td#people.name#/td /CFOUTPUT ...because it doesn't seem to recognise the scopes (Element TASKS.NAME is undefined in TASKS). But I need the scopes because I (perhaps foolishly) have three fields called name! Do I need to make all the field names in my database unique, or is there another way? TIA! CK. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190793 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Making a game!
Dear list, I've been asked to help make a web wargame! I was wondering if ColdFusion is a capable tool. I'm basically envisaging a database that contains details of each side's forces. Each turn, the players send commands via a web page. Ideally CF then calculates the results of said commands and makes alterations to the data accordingly. So, at its simplest: player one decides to attack player two. CF compares the two forces then adds a random value to each. The force with the highest result wins. CF determines how much damage has been done to the winner and loser - based on the difference between the two results - then changes the database accordingly. Is that doable? What CF commands should I be investigating for this kind of calculation? Thanks! CK. ~| Protect Your PC from viruses, hackers, spam and more. Buy PC-cillin with Easy Installation Support http://www.houseoffusion.com/banners/view.cfm?bannerid=61 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190590 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Preventing users CFINSERTing duplicate records
Hello list! Well, that's it really. What's the best way to prevent a user from inserting duplicate records? FYI in this case it's going into a MySQL table that has only two columns: -- co_id co_name [PKey] -- Thanks! CK. ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187065 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Appointments scheduling system
Dear list! So I've got to make an appointment scheduling system for a doctor's surgery.I really can't be bothered to code it myself...does anyone know of an existing CF system I could buy, or any open source stuff I could easily repurpose? Kind regards, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: WWOT: OS X for Intel?
Could Apple make a dent in the windows desktop? Is this the time and place? Should they? Right now they have an interesting opportunity.Consumers normally have to pass through six buyer-readiness stages before they make a purchase: 1. Awareness I'm aware of the brand 2. Knowledge I know what they do 3. Liking I identify with the values of the brand 4. Preference I prefer the values of the brand to those of other brands 5. Conviction My life will be better if I can buy this brand 6. Purchase Here's my money I would say that historically, Apple have been stuck at the knowledge stage with the mainstream, who never get round to liking Apple as a brand because they don't use the products (in my experience most people who move on to Apples would sooner eat razor blades than go back).But - now millions of people have iPods, and maybe are running iTunes on Windows and thinking, man, this works a lot better than any other piece of software on this crummy ugly machine on my desktop, I'm feeling pretty favourably disposed to Apple right now.So IMHO the conditions for a market push might be more favourable for Apple than they were, say, two years ago. CK (marketing genius, ColdFusion rookie) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Access alternatives (WAS: Security gurus out there?)
If you're storing lots of sensitive information in a web application, DON'T RUN IT ON ACCESS!!! Access is a desktop database, threads frequently crop up on here with lots of info on why it's really NOT suited to a server environment... What's a better choice?SQL Server?Does anyone know of an idiot's guide to it I could check out somewhere? Ciao! CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
CFMX dedicated hosting
Dear list, I'm considering getting my own (as opposed to a shared) CFMX server for a big project.Are there any good hosting companies in the UK?I'm already aware of a company called Satachi. Kind regards, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Breadcrumbs - do you fully track users?
What do you do for breadcrumbs on your sites? Do you display the actual route the user took to get to this page or do you show the normal 3-4 steps from the home page, regardless of the way the user actually got there? To me the purpose of breadcrumbs is more to show the navigational structure of the site than allow a user to retrace her steps (which she has a back button for anyway). [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Exactly *how* smart are we?
I follow most of these discussions on CF, and it's obvious there are some extremely intelligent people here. I'd like to invite everyone to visit the International High IQ Society Website... I've always been a little sceptical when people suggest a subject so complex and diverse as human intelligence can be boiled down to one number.The verbal intelligence test, for instance: how does knowing who Voltaire was measure one's intellect in any way?(Just in case y'all think this is sour grapes, I scored 138.) Kind regards, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Inserting into multiple tables
Dear list, So here I am, at the last line of defence, so to speak: my first app is due today! Luckily, I'm nearly finished, but I have another stupid question for you lot, my new favourite people.I'd like to insert values from an insert form into two separate tables.I'm planning to use a SQL insert like this: CFQUERY datasource=myDatasource INSERT INTO tasks(taskname,deadline,notes) VALUES('#taskname#','#deadline#','#notes#') /CFQUERY In my backend Access database I have a relationship between two tables: TASKSPROJECTS Project -- projectsID [key] projectname The insert form gets all the projectnames and puts them in a list box.But how do I go from there to inserting the corresponding projectsID value into the tasks table? Thank you for your continued patience with my stupid, basic questions. Yours tiredly and confusedly, CK [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Inserting into multiple tables
In my backend Access database I have a relationship between two tables: TASKS PROJECTS Project -- projectsID [key] projectname That didn't survive reformatting very well.Let me try again: TASKS project (linked to projectsID) PROJECTS projectsID (the key) projectname [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
SOLVED: Inserting into multiple tables
Dear list, I think I'm falling in love with you, all of you.Deanna, thank you so much, that worked perfectly. Kind regards, CK. On 19 Aug 2004, at 2:05 pm, Deanna Schneider wrote: I'm not sure I'm following you, Chris. But, are you saying that you're currently passing the projectname, but you need the projectid? If so, you can display the projectname and pass the projectid. On your form, just do this: select... option value=#projectid##projectname#/option /select - Original Message - From: Chris Kavanagh ! Luckily, I'm nearly finished, but I have another stupid question for you lot, my new favourite people. I'd like to insert values from an insert form into two separate tables. I'm planning to use a SQL insert like this: CFQUERY datasource=myDatasource INSERT INTO tasks(taskname,deadline,notes) VALUES('#taskname#','#deadline#','#notes#') /CFQUERY In my backend Access database I have a relationship between two tables: TASKS PROJECTS Project -- projectsID [key] projectname The insert form gets all the projectnames and puts them in a list box. But how do I go from there to inserting the corresponding projectsID value into the tasks table? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
500 error until I refresh
Dear list, Here's an odd one.My page projects.cfm links (via a standard A HREF="" to the page newtask.cfm. In my browser I get an HTTP 500 error - (The page cannot be displayed...) but when I refresh it it loads fine.This hasn't happened in any of my other .cfm pages - any ideas? I am running a local server (CFMX dev ed) on a Win XP PC, and viewing with IE5. Puzzled, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
SOLVED: 500 error until I refresh
:DI fixed it all by myself.I found the clue in the server log.I'm turning into a coder! On 19 Aug 2004, at 3:03 pm, Chris Kavanagh wrote: Dear list, Here's an odd one. My page projects.cfm links (via a standard A HREF="" to the page newtask.cfm. In my browser I get an HTTP 500 error - (The page cannot be displayed...) but when I refresh it it loads fine. This hasn't happened in any of my other .cfm pages - any ideas? I am running a local server (CFMX dev ed) on a Win XP PC, and viewing with IE5. Puzzled, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: SOLVED: 500 error until I refresh
heh good job, what was it I was CFOUTPUTing a value that I hadn't CFQUERYd.Rookie mistake... [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
A bit confused with links between tables
Dear list, As the witching hour approaches and my first deadline draws near, expect my stress levels to climb and my emails to get less and less graceful.For now, I feel remarkably composed, although I don't suppose I'll be getting to bed anytime soon. Now: this query fetches some data from two tables. CFQUERY name=get_tasks datasource=taskomatic SELECT tasks.taskID, tasks.taskname, tasks.status, tasks.project, projects.projectsID, projects.projectname, projects.client FROM tasks, projects WHERE tasks.project=projects.projectsID /CFQUERY Further down I have a table that looks something like this: CFOUTPUT query=get_tasks #task.taskname##task.status##projects.projectname# #projects.client# /CFOUTPUT The trouble is that the field project.client just returns the primary key from another table (clients).I'd like it to display the field clients.clientname. I appreciate that this an extremely low hurdle to fall at but I've been frying my brain with this stuff for days and I'm finding it hard to think straight... Kind regards, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
A bit confused about links in my data
Dear list, As the witching hour approaches and my first deadline draws near, expect my stress levels to climb and my emails to get less and less graceful.For now, I feel remarkably composed, although I don't suppose I'll be getting to bed anytime soon. Now: this query fetches some data from two tables. CFQUERY name=get_tasks datasource=taskomatic SELECT tasks.taskID, tasks.taskname, tasks.status, tasks.project, projects.projectsID, projects.projectname, projects.client FROM tasks, projects WHERE tasks.project=projects.projectsID /CFQUERY Further down I have a table that looks something like this: CFOUTPUT query=get_tasks #task.taskname##task.status##projects.projectname# #projects.client# /CFOUTPUT The trouble is that the field project.client just returns the primary key from another table (clients).I'd like it to display the field clients.clientname. I appreciate that this an extremely low hurdle to fall at but I've been frying my brain with this stuff for days and I'm finding it hard to think straight... Kind regards, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
I love you guys
all of you. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
CFUPDATE-ing without a form?
Dear list, Is there any way to CFUPDATE without using a form?I'd like to pass the data as variables in the URL. TIA, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
SOLVED: CFUPDATE-ing without a form?
Wow.Many, many thanks to Michael and Matthew and their very quick responses! Best, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
setting a default value in my SELECT tag
Dear list, I'm sure there is a simple answer to this basic question.Sorry for being such a noob: I'm working on my first application!I hope to become a useful member of the CF community one day.But first you will have to put up with my stupid questions for a while. Stupid question the second: I have a select element in a form.The options are populated from a database.It looks a bit like this: CFQUERY name=get_projects datasource=datasource SELECT projectname FROM projects /CFQUERY ... SELECT name=project CFOUTPUT query=get_projects OPTION#projectname#/OPTION /CFOUTPUT /SELECT It works beautifully so far, giving me a list of all the projects in my database.But I'd like it to default to a certain value from another query.So I added some more code: CFQUERY name=get_details datasource=datasource SELECT projectname FROM projects WHERE ID=[a certain value] /CFQUERY CFOUTPUT query=get_details SELECT name=project value=#projectname# /CFOUTPUT CFOUTPUT query=get_projects OPTION#projectname#/OPTION /CFOUTPUT /SELECT But it just doesn't work: it won't default to the value from the new query.Am I being a total moron? TIA, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
SOLVED: setting a default value in my SELECT tag
Dear Ewok, Thank you, you're a genius.I was just fumbling around the edges of that solution, but my way involved all kinds of CFSETs and stuff: using the scope is much more elegant. My first app is working quite nicely but I bet the code is flabby.I will probably look back on it and cringe one day. Thanks again. CK. On 19 Aug 2004, at 1:55 am, Ewok wrote: try this on for size SELECT name=project CFOUTPUT query=get_projects OPTION value=#ID#cfif ID is get_details.ID selected/cfif#projectname#/OPTION /CFOUTPUT /SELECT - Original Message - From: Chris Kavanagh To: CF-Talk Sent: Wednesday, August 18, 2004 8:33 PM Subject: setting a default value in my SELECT tag Dear list, I'm sure there is a simple answer to this basic question. Sorry for being such a noob: I'm working on my first application! I hope to become a useful member of the CF community one day. But first you will have to put up with my stupid questions for a while. Stupid question the second: I have a select element in a form. The options are populated from a database. It looks a bit like this: CFQUERY name=get_projects datasource=datasource SELECT projectname FROM projects /CFQUERY ... SELECT name=project CFOUTPUT query=get_projects OPTION#projectname#/OPTION /CFOUTPUT /SELECT It works beautifully so far, giving me a list of all the projects in my database. But I'd like it to default to a certain value from another query. So I added some more code: CFQUERY name=get_details datasource=datasource SELECT projectname FROM projects WHERE ID=[a certain value] /CFQUERY CFOUTPUT query=get_details SELECT name=project value=#projectname# /CFOUTPUT CFOUTPUT query=get_projects OPTION#projectname#/OPTION /CFOUTPUT /SELECT But it just doesn't work: it won't default to the value from the new query. Am I being a total moron? TIA, CK. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]