Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > A-B-C-D... links: Have two records in a field

Reply
Thread Tools

A-B-C-D... links: Have two records in a field

 
 
Boolean
Guest
Posts: n/a
 
      07-28-2004
Hi all.

Im new to ASP, and have hit a snag.

I am trying to build a page that has 'A-B-C-D...' links along the top
of the page. When you click 'A', it goes to a table with everyones
usernames and grabs the ones that start with the letter A.

The problem is that the username field contains the names of people
who wrote an article, so in some cases there are actually two names in
this field. So for example, if it contained 'Bob, Jack', I would need
'Bob' to show up under B, and 'Jack' under J.

Im totally stuck as to how I might do this. Changing the layout of my
tables is no trouble if a different table setup helps. Any thoughts?
 
Reply With Quote
 
 
 
 
James Baker
Guest
Posts: n/a
 
      07-28-2004
If they're always going to be stored in that format, you can do a select
statement with LIKE B% OR LIKE %, B% or something to that effect. Kind of a
hokey way to do it, but it should work.

"Boolean" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi all.
>
> Im new to ASP, and have hit a snag.
>
> I am trying to build a page that has 'A-B-C-D...' links along the top
> of the page. When you click 'A', it goes to a table with everyones
> usernames and grabs the ones that start with the letter A.
>
> The problem is that the username field contains the names of people
> who wrote an article, so in some cases there are actually two names in
> this field. So for example, if it contained 'Bob, Jack', I would need
> 'Bob' to show up under B, and 'Jack' under J.
>
> Im totally stuck as to how I might do this. Changing the layout of my
> tables is no trouble if a different table setup helps. Any thoughts?



 
Reply With Quote
 
 
 
 
Chris Hohmann
Guest
Posts: n/a
 
      07-28-2004
"Boolean" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi all.
>
> Im new to ASP, and have hit a snag.
>
> I am trying to build a page that has 'A-B-C-D...' links along the top
> of the page. When you click 'A', it goes to a table with everyones
> usernames and grabs the ones that start with the letter A.
>
> The problem is that the username field contains the names of people
> who wrote an article, so in some cases there are actually two names in
> this field. So for example, if it contained 'Bob, Jack', I would need
> 'Bob' to show up under B, and 'Jack' under J.
>
> Im totally stuck as to how I might do this. Changing the layout of my
> tables is no trouble if a different table setup helps. Any thoughts?


Database? Version? DDL? Sample Data? Desired Output?
http://aspfaq.com/etiquette.asp?id=5006

Absent this information all I can offer is prose. You may want to consider
creating an articles table with a one to many relationship to an authors
table. Then create a stored procedure/parameterized query based on the
authors table joined to the articles table passing in an last_initial
parameter used to filter the data.


 
Reply With Quote
 
just1coder@yahoo.ca
Guest
Posts: n/a
 
      07-28-2004
I wrote a function to check for a valid email...

function IsEmailValid(email)
dim sql
sql = "usp_isemailvalid " & email
set rs = conn.execute(sql)
if rs.eof then
IsEmailValid = false
else
IsEmailValid = true
end if
end function

how can I use that function in an if statement ??

if IsEmailValid(email) = true then
response.write("success!")
else
response.write("fraid not!")
end if
 
Reply With Quote
 
dlbjr
Guest
Posts: n/a
 
      07-28-2004
if IsEmailValid(email) then
response.write("success!")
else
response.write("fraid not!")
end if


dlbjr
Pleading sagacious indoctrination!


 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
Simple query returns 0 records in asp, but all records in vbscript masg0013@gmail.com ASP General 3 11-02-2006 09:23 AM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
Delete records or update records Dan ASP General 1 05-10-2004 01:25 PM
match muliple header records to associated detail records Luke Airig XML 0 12-31-2003 12:06 AM



Advertisments