|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Hey, i wasn't really sure where to put this question so i thought id post it this section. i've created an e-commerce site that sells various products, and on the details page (below the product), i would like to have a 'customer review' section where users can read other users' comments about that specific product and be given the chance to post comment themselves. ive seen several other asp sites that can do this (i.e http://affordablesupplements.co.uk/....asp?prodid=512 ).
the only part i really understand is the insert record bit when the user submits their comment and it goes into the database. originally i assumed that i could create a a new field in my product table, but if i want multiple reviews, thats not possible, so i assume i have to create a table per product. right? if i got really lazy i could just create one page which displays reviews about all products, but thats a last resort. any help would be really appreciated. Last edited by scratch : April 30th, 2004 at 06:43 PM. |
|
#2
|
||||
|
||||
|
The easiest way to do this would be to have a new table for all product reviews. In that table have the following columns: id, review details and product id. On the product page you'll then just search the table for any reviews with the same product id and the current product being displayed.
|
|
#3
|
|||
|
|||
|
ok thanks. but how do i make it so only the appropiate reviews are displayed in the details page and also when a user submits a new review, how do i make it so the review is for that secific product?
|
|
#4
|
||||
|
||||
|
In the table that you have for the reviews, you have an addition column which contains the id of the product. When creating a new review, you enter a new row in the table with the id of the product as one of the fields. When displaying reviews, you only display reviews from the table where the id field is equal to the id of the product currently being viewd.
|
|
#5
|
|||
|
|||
|
thanks for your help. ive actually got it all wrking but now i have a new problem.
on the details page where i display the reviews, any page that has a review works fine, but on a page where there are no reviews, where it should be blank this error message appears: ADODB.Fielderror '800a0bcd' Unknown runtime error /irfan/detail.asp, line 395 on that particular line is where i've inserted my pid recordset <td><%=(rev.Fields.Item("pid").Value)%></td> any idea how i can fix this. cheers!! |
|
#6
|
||||
|
||||
|
Sorry, I don't know. Haven't done ASP for a while now...
|
|
#7
|
|||
|
|||
|
ok, thanks anyway, one last question. how do i get the date the rview was submitted, cos there is a field in the database that lets u do tat but its always empty.
|
![]() |
| Viewing: ASP Free Forums > Other > ASP Free Lounge > product/ customer review |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|