Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Rs.movenext help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Rs.movenext help

 Post Reply Post Reply
Author
l15aRd View Drop Down
Groupie
Groupie


Joined: 24 May 2002
Location: England
Status: Offline
Points: 121
Post Options Post Options   Thanks (0) Thanks(0)   Quote l15aRd Quote  Post ReplyReply Direct Link To This Post Topic: Rs.movenext help
    Posted: 31 March 2003 at 4:44am

I have a couple of ASP problems,

1. I have a DB, can display records, which is great, BUT at the start of each record I have a approved Yes/no field, and want to display only the records the have yes, so I triedsomething along the line of:

if x_aprvd = false then rs.movenext else (rest of record)

<table........

I know the above is not code correct (no delimiters and all, it's just off the top of my head), I have an existing end if, rs.movenext, loop command later on to loop through and display the records.

 

2. I've managed to add comments to another record (1 to many routeen)and what I would like to do is, on clicking to add a comment to a record, to add the record id to to a field on the comments table so I can then display the comments related to that record, I've managed to list the record ID's in a list, but have gone brain dead and can't think past this one...

 

Thanx in advance

 


DrunkenTechie.net

You can logoff, but you can never leave
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2003 at 5:10am

umm didnt quite understand the no. 2 question

and for number 1, i aint sure cose ya said ya did it off the top of ya head, but is it cose it doesnt have quotes round the "false" ... like that?

Back to Top
l15aRd View Drop Down
Groupie
Groupie


Joined: 24 May 2002
Location: England
Status: Offline
Points: 121
Post Options Post Options   Thanks (0) Thanks(0)   Quote l15aRd Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2003 at 5:37am

the code line above isn't the exact script, it's just an example for quickness, but goes along those sort of lines, but it maybe completely different...it's just the way I was attempting to do it.... I can get the exact code 2night at home, I don't have it with me at work :(

I don't think that the testing value would have to be in "" as it's either Ture or false and not Text, as the text would be represented as "yes" or "no"



Edited by l15aRd

DrunkenTechie.net

You can logoff, but you can never leave
Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2003 at 7:52am

For question one why dont you just use select * from table where x_aprvd = True. This would be faster as it would return less results from the origional query, also you wouldnt have to use the if statement.



Edited by ultramods
Back to Top
l15aRd View Drop Down
Groupie
Groupie


Joined: 24 May 2002
Location: England
Status: Offline
Points: 121
Post Options Post Options   Thanks (0) Thanks(0)   Quote l15aRd Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2003 at 8:07am
will try that 2night, and get back to ya...:)

DrunkenTechie.net

You can logoff, but you can never leave
Back to Top
l15aRd View Drop Down
Groupie
Groupie


Joined: 24 May 2002
Location: England
Status: Offline
Points: 121
Post Options Post Options   Thanks (0) Thanks(0)   Quote l15aRd Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2003 at 4:56am

I used the string

Select * FROM [tblinks] WHERE [link_aprvd] = true

So thanks Ultramods for that,

now all I need to do is, I have a links table and a comments table, and want people to post comments about the links, I have a duplicate field on both tables called [Link_id], how do I set the [Link_id] on the comments table to the value of the record they want to comment on?? (abit like posting a comment on the forum)

Thanx again for any help given

 

 


DrunkenTechie.net

You can logoff, but you can never leave
Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2003 at 5:13am

For each link you could have a button called "comment". When they click on the button it go's to a page where they can comment on the link. The url for this page would have a queryString for the linkID.

For example. www.youdomain.co.uk/commentOnLink.asp?linkID=2

Let the users add there posts then enter all the details into your comments table including the linkID. ie rs("linkID") = linkID

 

Back to Top
l15aRd View Drop Down
Groupie
Groupie


Joined: 24 May 2002
Location: England
Status: Offline
Points: 121
Post Options Post Options   Thanks (0) Thanks(0)   Quote l15aRd Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2003 at 5:32am
Once again you've come up trumps, will try it tonight, adn let you know, and then the fruits of my work will be available for all to see, a (links manager, with admin section and all) and if anyone wants it, I'll make a downloadable version, with out my site customisations

DrunkenTechie.net

You can logoff, but you can never leave
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.