I searched online and could not find a solution to these two (simple?) problems.
1. In my database table I entered phone numbers in this form: xxx-xxx-xxxx
Can you share with me (or point me to a tutorial that shows) how I might query my table by area code when the area code is not a separate field? I *think* the phone number is stored as a string, is that correct?
2. In that same table is a field for last name. I want to create one of those "alphabet bars" that looks like this:
A | B | C | D | ...| Z
and let my visitors query my table by last initial. This is similar to question 1 above, but there are two parts giving me trouble:
a) how do I pass the selected letter to my script when that letter is a link, and
b) how can I query the last name field by that letter?
I'm thinking that I'll use a ".... LIKE R%" and use a wild card to retrieve last names that begin with R, for example, but I can't get it to work. Can you share a solution or point me to some online help? I certainly don't want you to spoon feed me, but a firm push in the right direction would be very welcome.
Thank you all very much for your time.