Ask a Question related to ASP, Design and Development.
-
vool #1
Seperating data from single table field (string)
Hi All
Can anyone help with this please.
I need a way of putting say 10 to 20 bullet points in one table field in an
Access database
- say seperate them with a special character, then build a bulletted list on
my page.
If I can get the page to detect each special character, insert a new bullet
and move on to the next occurance in the string...
e.g. point01%point02%point03%point04%point05%point06
to...
<ul>
<li>point01</li>
<li>point02</li>
<li>point03</li>
<li>point04</li>
<li>point05</li>
<li>point06</li>
</ul>
Many thanks in advance
vool
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003
vool Guest
-
Parse a string from a field and display in table
Hi, I am new to ASP but have what should be a fairly simple task that I can't figure out. I need to parse a string from a single, semi-colon... -
Seperating data within a field
Hi All, I am designing a website for a tennis club. Each week Tennis Australia release an excel spreadsheet of last weekend's results. I import... -
ASP Code to generate the schema of an SQL Table (field name, Data types , Size)
Anyone has this SQL STATEMENT to traverse the User defined tables? I just need the Select Statement to get this info the rest I can handle. I... -
#25473 [NEW]: Updating single row in table causing all rows in table to be updated.
From: jim at bluedojo dot com Operating system: WinXP PHP version: 4.3.3 PHP Bug Type: MySQL related Bug description: ... -
Select from table where field = string
How to select all lines containg a string (located in $pastmove) in the moves column I tried several ways, for example: $requete="SELECT... -
Alan #2
Re: Seperating data from single table field (string)
Just store the terms as a comma separated list (or use a more robust
placeholder if commas are likely to appear in any term). When you retrieve
this string from the database split it on the placeholder, which generates
an array, and iterate through creating your HTML:
MyStringTerm = RS.Fields("MyString") ' contains "alpha,bravo,charlie"
MyStringArray = Split (MyStringTerm, ",") ' contains
("alpha","bravo","charlie")
Response.Write "<ul>"
For Each Term In MyStringArray
Response.Write "<li>"
Response.Write Term
Response.Write "</li>"
Next
Response.Write "</ul>"
Alan
"vool" <vool@fsnet.com> wrote in message
news:eHV4tswYDHA.2032@TK2MSFTNGP10.phx.gbl...an> Hi All
>
> Can anyone help with this please.
>
> I need a way of putting say 10 to 20 bullet points in one table field inon> Access database
> - say seperate them with a special character, then build a bulletted listbullet> my page.
>
> If I can get the page to detect each special character, insert a new> and move on to the next occurance in the string...
>
> e.g. point01%point02%point03%point04%point05%point06
>
> to...
>
> <ul>
> <li>point01</li>
> <li>point02</li>
> <li>point03</li>
> <li>point04</li>
> <li>point05</li>
> <li>point06</li>
> </ul>
>
> Many thanks in advance
>
> vool
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
> Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003
>
>
Alan Guest
-
vool #3
Re: Seperating data from single table field (string)
Wow that was fast, thanks Alan, that'll do the trick
"Alan" <SPAMMENOTalan.howard@inspire.net.nz> wrote in message
news:#1Hma3wYDHA.2464@TK2MSFTNGP09.phx.gbl...list> Just store the terms as a comma separated list (or use a more robust
> placeholder if commas are likely to appear in any term). When you retrieve
> this string from the database split it on the placeholder, which generates
> an array, and iterate through creating your HTML:
>
> MyStringTerm = RS.Fields("MyString") ' contains "alpha,bravo,charlie"
> MyStringArray = Split (MyStringTerm, ",") ' contains
> ("alpha","bravo","charlie")
> Response.Write "<ul>"
> For Each Term In MyStringArray
> Response.Write "<li>"
> Response.Write Term
> Response.Write "</li>"
> Next
> Response.Write "</ul>"
>
> Alan
>
> "vool" <vool@fsnet.com> wrote in message
> news:eHV4tswYDHA.2032@TK2MSFTNGP10.phx.gbl...> an> > Hi All
> >
> > Can anyone help with this please.
> >
> > I need a way of putting say 10 to 20 bullet points in one table field in> > Access database
> > - say seperate them with a special character, then build a bulletted> on> bullet> > my page.
> >
> > If I can get the page to detect each special character, insert a new>> > and move on to the next occurance in the string...
> >
> > e.g. point01%point02%point03%point04%point05%point06
> >
> > to...
> >
> > <ul>
> > <li>point01</li>
> > <li>point02</li>
> > <li>point03</li>
> > <li>point04</li>
> > <li>point05</li>
> > <li>point06</li>
> > </ul>
> >
> > Many thanks in advance
> >
> > vool
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
> > Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003
> >
> >
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003
vool Guest
-
Bob Barrows #4
Re: Seperating data from single table field (string)
I'm glad Alan answered your questions, but I want to add that it's usually a
bad idea to store multiple pieces of data in a single field. This is a basic
tenet of proper database design. A better idea would be to create a separate
table with a one-to-many relationship between the original table and the new
table, allowing you to store each peice of data in its own row in the new
table.
You may be thinking that the list itself is a single piece of data, but this
is belied by the fact that you need to string together multiple pieces of
data to form it.
HTH,
Bob Barrows
vool wrote:> Hi All
>
> Can anyone help with this please.
>
> I need a way of putting say 10 to 20 bullet points in one table field
> in an Access database
> - say seperate them with a special character, then build a bulletted
> list on my page.
>
> If I can get the page to detect each special character, insert a new
> bullet and move on to the next occurance in the string...
>
> e.g. point01%point02%point03%point04%point05%point06
>
> to...
>
> <ul>
> <li>point01</li>
> <li>point02</li>
> <li>point03</li>
> <li>point04</li>
> <li>point05</li>
> <li>point06</li>
> </ul>
>
> Many thanks in advance
>
> vool
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
> Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003
Bob Barrows Guest



Reply With Quote

