Current location: Hot Scripts Forums » Programming Languages » ASP » PrObLeMs...


PrObLeMs...

Reply
  #1 (permalink)  
Old 08-25-04, 10:32 PM
EvAn EvAn is offline
New Member
 
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
PrObLeMs...

Hi!
Can anyone help me with this piece of code?

qty=request.form("qty")
qty=Split(qty,",")
choices = request.form("form")
choices = Split(choices, ",")

for each num in qty
if num=1 then
for each member in choices
num=1
sSQL = "INSERT into data (name, address, contact, user_name, form,qty) values ('" & name & "', '" & address & "', '" & contact & "', '" & user_name & "', '" & member & "', '" & num & "')"

connection.execute(sSQL)
next
else
for each member in choices
num=num
sSQL = "INSERT into data (form,qty) values ('" & member & "', '" & num & "')"

connection.execute(sSQL)
next
end if
next
__________________________________________________ _______________
thanx alot!
Reply With Quote
  #2 (permalink)  
Old 08-30-04, 10:32 PM
Mikeirv Mikeirv is offline
Newbie Coder
 
Join Date: May 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
What are you trying to do? What is your problem?
Reply With Quote
  #3 (permalink)  
Old 08-31-04, 08:41 PM
EvAn EvAn is offline
New Member
 
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
which the codes that i post, i expect the data to be enter this way into the database...
____________________
| form | qty |
--------------------
| mem | num |
--------------------
| mem(1) | num(1) |
--------------------
| mem(2) | num(2) |
--------------------
| ... | ... |
--------------------

but it keep giving me

____________________
| form | qty |
--------------------
| mem | num |
--------------------
| mem | num(1) |
--------------------
| mem(1) | num |
--------------------
| mem(1) | num(1) |
--------------------
is it something wrong with my codes?
Please help me...
Thanks alot...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with function Taishinsei PHP 5 08-22-04 03:07 PM
MYSQL server problems and upgrading rsuresh PHP 5 06-17-04 06:15 PM
pop up problems w/ IE6 maksimus JavaScript 4 05-29-04 01:49 AM
trying to set up a apache,php,mysql test server, but having problems Primitive_screw PHP 3 02-13-04 04:19 PM
2 spacing/alignment problems Arowana HTML/XHTML/XML 0 01-07-04 11:58 AM


All times are GMT -5. The time now is 03:03 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.