Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SQL search problem

Guest
Oct 10, 2007 Oct 10, 2007
I am designing a lookup table. In the table are columns called id, countryprefix, country and rate. If i have a phone number i want to search the countryprefix column and have the search return the country and the rate, how do i go about doing this?
TOPICS
Server side applications
227
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 10, 2007 Oct 10, 2007
LATEST
Parse out the country prefix from the number (don't know how/what the
input looks like, so it is a vague answer there)

With that:
SELECT country, rate FROM table WHERE countryprefix = "parsedInfo"

Paul Davis
http://www.kaosweaver.com/
Visit us for dozens of useful Dreamweaver Extensions.

http://www.communitymx.com/
Partner at Community MX - Extend your knowledge

kezzab25 wrote:
> I am designing a lookup table. In the table are columns called id,
> countryprefix, country and rate. If i have a phone number i want to search the
> countryprefix column and have the search return the country and the rate, how
> do i go about doing this?
>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines