|
 |
asp_databases thread: RE: Display List of questions from database with hyper link and Checkbox with each row.
Message #1 by "Kim Iwan Hansen" <kimiwan@k...> on Thu, 2 Jan 2003 11:41:47 +0100
|
|
For your first question, give the checkboxes the same name (e.g. <input
type="checkbox" name="record_id" value="">) and set their value to that of
the record you're displaying in the current row. When you select one or
more records to be deleted, you'll get a comma-delimited string of those
numeric values for use in your sql delete query.
Your sql delete query will then look something like this: "DELETE FROM
tblName WHERE id IN (" & record_id_from_the_form & ")".
To solve your second problem, add another field to the database to indicate
whether the question has been opened yet. When you retrieve the list of
questions for display, retrieve the field value that indicates if it's been
opened or not. When you open a question, update the field to indicate it's
been opened.
-Kim
-----Original Message-----
From: Khalid Qureshi [mailto:khalidone@y...]
Sent: 29. december 2002 04:42
To: ASP Databases
Subject: [asp_databases] Display List of questions from database with
hyper link and Checkbox with each row.
Dear friends, I have a list of Questions in the database. I want to
display it on the web using asp in such a way that each question with a
hyperlink and a check box. If a user wants to view the detailed question
he will click on the subject of the question and then he would be able to
view the question and if user wants to delete the a question or more than
one question he would be able to check the checkbox and delete by clicking
delete button. One thing more is that the appearance of the questions
which have not been viewed must look different from those which have been
viewed every time user logs in just like an email box.
If any body have and idea or experience please help me.
Message #2 by khalid qureshi <khalidone@y...> on Thu, 2 Jan 2003 21:42:55 -0800 (PST)
|
|
I have tried your technique and it is working thanks
for your concern.
Thankyou very much kim.
Khalid
--- Kim Iwan Hansen <kimiwan@k...> wrote:
> For your first question, give the checkboxes the
> same name (e.g. <input
> type="checkbox" name="record_id" value="">) and set
> their value to that of
> the record you're displaying in the current row.
> When you select one or
> more records to be deleted, you'll get a
> comma-delimited string of those
> numeric values for use in your sql delete query.
>
> Your sql delete query will then look something like
> this: "DELETE FROM
> tblName WHERE id IN (" & record_id_from_the_form &
> ")".
>
> To solve your second problem, add another field to
> the database to indicate
> whether the question has been opened yet. When you
> retrieve the list of
> questions for display, retrieve the field value that
> indicates if it's been
> opened or not. When you open a question, update the
> field to indicate it's
> been opened.
>
> -Kim
>
> -----Original Message-----
> From: Khalid Qureshi [mailto:khalidone@y...]
> Sent: 29. december 2002 04:42
> To: ASP Databases
> Subject: [asp_databases] Display List of questions
> from database with
> hyper link and Checkbox with each row.
>
>
> Dear friends, I have a list of Questions in the
> database. I want to
> display it on the web using asp in such a way that
> each question with a
> hyperlink and a check box. If a user wants to view
> the detailed question
> he will click on the subject of the question and
> then he would be able to
> view the question and if user wants to delete the a
> question or more than
> one question he would be able to check the checkbox
> and delete by clicking
> delete button. One thing more is that the appearance
> of the questions
> which have not been viewed must look different from
> those which have been
> viewed every time user logs in just like an email
> box.
> If any body have and idea or experience please help
> me.
>
>
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
|
|
 |