Inserting an array into a database.

This is a discussion on "Inserting an array into a database." within the Classic ASP section. This forum, and the thread "Inserting an array into a database. are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Mar 17th, 2006, 10:21
Gup Gup is offline
New Member
Join Date: Mar 2006
Location: Warick
Age: 26
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Inserting an array into a database.

I have a form that has 20 check boxes, i have store the values into an array, i was wondering how i would then insert the array into the database, i would prefer the data to go into one field rather than 20 different fields. can anyone help?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 9th, 2006, 18:17
Up'n'Coming Member
Join Date: Aug 2006
Location: Peru
Age: 21
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Inserting an array into a database.

You can easyly pass the data into an string variable, then separate each field by a colon, for example. But I don't find it very useful. If you could explain it a litle more, may be I could find another solution.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 10th, 2006, 08:49
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: Inserting an array into a database.

I'd recommend saving as string because
1. it's faster: one record to read from database instead of many
2. it's flexible: easy to change and allows for clever little tweaks
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
inserting, array, database

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
inserting time phiero21 JavaScript Forum 1 May 2nd, 2008 20:09
Inserting Session into the database franknu PHP Forum 11 Jun 17th, 2007 00:16
Sorting a new array from an existing array Ozeona Flash & Multimedia Forum 2 Sep 20th, 2005 08:43
array unable to check another array so as to be displayed Ozeona Flash & Multimedia Forum 1 Aug 5th, 2005 10:26
inserting data to mysql db Tim356 PHP Forum 1 May 6th, 2005 04:20


All times are GMT. The time now is 15:52.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42