Hi
i've got the condition in asp & database that
the product id holding multipule items values
html checkbox already checked if value in the database but if not then it's unchecked
& i'm gonna check that if it's already into the database
then don't insert the value & if it's not then insert it but other condition is
i'm taking user input from check box so if some body don't want to insert again then deleted the value from the database
table values like this [code=asp]
prod id | sizes
1 | 1
1 | 2
1 | 4
1 | 6
1 | 7 [/code]
like [code=asp]
if size2 = "2" Then
sqlText = "INSERT INTO PRODUCT_SIZES " _
& " (size_id, prod_id) values " _
& " ('2',"&prid&")"
Conn.Execute(sq lText)
else if size2 = "" <> Then
sqlText = "Delete size_id, prod_id From Product_sizes Where prod_id=" & pds
Conn.Execute(sq lText)
end if
[/code]
question is how do i gona check the value 1st & then execute the code to insert & Delete ?
coz i'm gonna do this in so many times
can any body help in this ?
i've got the condition in asp & database that
the product id holding multipule items values
html checkbox already checked if value in the database but if not then it's unchecked
& i'm gonna check that if it's already into the database
then don't insert the value & if it's not then insert it but other condition is
i'm taking user input from check box so if some body don't want to insert again then deleted the value from the database
table values like this [code=asp]
prod id | sizes
1 | 1
1 | 2
1 | 4
1 | 6
1 | 7 [/code]
like [code=asp]
if size2 = "2" Then
sqlText = "INSERT INTO PRODUCT_SIZES " _
& " (size_id, prod_id) values " _
& " ('2',"&prid&")"
Conn.Execute(sq lText)
else if size2 = "" <> Then
sqlText = "Delete size_id, prod_id From Product_sizes Where prod_id=" & pds
Conn.Execute(sq lText)
end if
[/code]
question is how do i gona check the value 1st & then execute the code to insert & Delete ?
coz i'm gonna do this in so many times
can any body help in this ?
Comment