best approach - appending fields in recordset
hello folks, I have a situation where the database was designed (limitation in the db unfortunately) so that if a user wants to enter a lot of text/content, they would have to add a new line for every entry that doesn't fit. Think textarea but only your using multiple input type text =( so when I pull up the query (which is correct), it displays all the lines/rowsof content for that field entered. example: courseID courseDescription (varchar 80) so if the description was more than 80 chars, then they would have to add another line. if the description was 350 chars, then 5 lines, etc. so, how would you approach this where I could append the results from the courseDescription field to make it all look like one? thanks, Lawrence [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: best approach - appending fields in recordset
With a one-to-many relationship like this, you might want courseID and courseDescription to be in seperate tables. You could then join ID and Description to bring back a list of descriptions, grouping the descriptions together to make it look like one description. Your Description table would probably have to have some type of ordering value in it though so you'd know how to construct the descriptions in the correct order. - Original Message - From: Lawrence Ng To: CF-Talk Sent: Monday, September 20, 2004 10:10 AM Subject: best approach - appending fields in recordset hello folks, I have a situation where the database was designed (limitation in the db unfortunately) so that if a user wants to enter a lot of text/content, they would have to add a new line for every entry that doesn't fit. Think textarea but only your using multiple input type text =( so when I pull up the query (which is correct), it displays all the lines/rowsof content for that field entered. example: courseID courseDescription (varchar 80) so if the description was more than 80 chars, then they would have to add another line. if the description was 350 chars, then 5 lines, etc. so, how would you approach this where I could append the results from the courseDescription field to make it all look like one? thanks, Lawrence [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: best approach - appending fields in recordset
the description field is on a separate table. the problem is that field type which is only char type not ntext/memo which would make it easier to order them properly. [EMAIL PROTECTED] 9/20/2004 9:29:33 AM With a one-to-many relationship like this, you might want courseID and courseDescription to be in seperate tables. You could then join ID and Description to bring back a list of descriptions, grouping the descriptions together to make it look like one description. Your Description table would probably have to have some type of ordering value in it though so you'd know how to construct the descriptions in the correct order. - Original Message - From: Lawrence Ng To: CF-Talk Sent: Monday, September 20, 2004 10:10 AM Subject: best approach - appending fields in recordset hello folks, I have a situation where the database was designed (limitation in the db unfortunately) so that if a user wants to enter a lot of text/content, they would have to add a new line for every entry that doesn't fit. Think textarea but only your using multiple input type text =( so when I pull up the query (which is correct), it displays all the lines/rowsof content for that field entered. example: courseID courseDescription (varchar 80) so if the description was more than 80 chars, then they would have to add another line. if the description was 350 chars, then 5 lines, etc. so, how would you approach this where I could append the results from the courseDescription field to make it all look like one? thanks, Lawrence [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: best approach - appending fields in recordset
So, if you've got 10 description entries that all go together somehow to form the overall description for one course, how do you know in which order they are supposed to go? Which sentence comes first, second, etc? Wouldn't you need some sort of ordering field to do this on the description table? - Original Message - From: Lawrence Ng To: CF-Talk Sent: Monday, September 20, 2004 2:36 PM Subject: Re: best approach - appending fields in recordset the description field is on a separate table. the problem is that field type which is only char type not ntext/memo which would make it easier to order them properly. snip [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: best approach - appending fields in recordset
yeah... that's right... my best guess is that I'll sort/order them asc fashion... first line entered (id 1), second line (id 2)... i'll see what I come up with [EMAIL PROTECTED] 9/20/2004 12:43:59 PM So, if you've got 10 description entries that all go together somehow to form the overall description for one course, how do you know in which order they are supposed to go? Which sentence comes first, second, etc? Wouldn't you need some sort of ordering field to do this on the description table? - Original Message - From: Lawrence Ng To: CF-Talk Sent: Monday, September 20, 2004 2:36 PM Subject: Re: best approach - appending fields in recordset the description field is on a separate table. the problem is that field type which is only char type not ntext/memo which would make it easier to order them properly. snip [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: best approach - appending fields in recordset
assuming you have this, I'd order teh content by courseid.Then use the group attribute of cfoutput to loop thgough all these descriptions outputing them.This will basically do COURSEID DESCR1DESCR2DESCR3..DESCRN format as desired Doug - Original Message - From: G [EMAIL PROTECTED] Date: Mon, 20 Sep 2004 14:43:59 -0500 Subject: Re: best approach - appending fields in recordset To: CF-Talk [EMAIL PROTECTED] So, if you've got 10 description entries that all go together somehow to form the overall description for one course, how do you know in which order they are supposed to go? Which sentence comes first, second, etc? Wouldn't you need some sort of ordering field to do this on the description table? - Original Message - From: Lawrence Ng To: CF-Talk Sent: Monday, September 20, 2004 2:36 PM Subject: Re: best approach - appending fields in recordset the description field is on a separate table. the problem is that field type which is only char type not ntext/memo which would make it easier to order them properly. snip [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: best approach - appending fields in recordset
yeah those were my thoughts too... [EMAIL PROTECTED] 9/20/2004 12:50:58 PM assuming you have this, I'd order teh content by courseid.Then use the group attribute of cfoutput to loop thgough all these descriptions outputing them.This will basically do COURSEID DESCR1DESCR2DESCR3..DESCRN format as desired Doug - Original Message - From: G [EMAIL PROTECTED] Date: Mon, 20 Sep 2004 14:43:59 -0500 Subject: Re: best approach - appending fields in recordset To: CF-Talk [EMAIL PROTECTED] So, if you've got 10 description entries that all go together somehow to form the overall description for one course, how do you know in which order they are supposed to go? Which sentence comes first, second, etc? Wouldn't you need some sort of ordering field to do this on the description table? - Original Message - From: Lawrence Ng To: CF-Talk Sent: Monday, September 20, 2004 2:36 PM Subject: Re: best approach - appending fields in recordset the description field is on a separate table. the problem is that field type which is only char type not ntext/memo which would make it easier to order them properly. snip [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]