Submit Your Article Forum Rules

Results 1 to 6 of 6

Thread: How to extract emails from table?

  1. #1
    WebProWorld MVP edhan's Avatar
    Join Date
    Aug 2003
    Posts
    941

    Question How to extract emails from table?

    Hi

    How can I write in php to extract emails corresponding to a database table from the usernames?

    Example:

    Table name as records

    Fields are: userid, username, password, emails, description, height, weight

    Let says a few usernames like peter, william, charles are selected as array from the table. How do I extract their emails from the same table? The usernames selected are random and are displayed. Now I want to select the corresponding emails with these usernames, how can I accomplish this?

    Any help will be appreciated. Thanks!
    Find Out More About Renting Thai Amulets For Blessing Of Protection in Well Being & Wealth | Destiny of Fate | Exploring, Understanding & Learning The Basic Feng Shui Art Of Placement To Build Wealth & Harmony With Friends, Colleagues And Family Members In Relationships & Careers... Do you want a better lifestyle? Check it out today!

  2. #2
    WebProWorld MVP edhan's Avatar
    Join Date
    Aug 2003
    Posts
    941

    Re: How to extract emails from table?

    Is there any easier way to just submit names and retrieve emails result?

    Say a person keys in peter, william and then submit

    The result will extract the emails based on the names key in as peter, william and displaying the emails.

    Is there a way to do this? Or it is not possible?
    Find Out More About Renting Thai Amulets For Blessing Of Protection in Well Being & Wealth | Destiny of Fate | Exploring, Understanding & Learning The Basic Feng Shui Art Of Placement To Build Wealth & Harmony With Friends, Colleagues And Family Members In Relationships & Careers... Do you want a better lifestyle? Check it out today!

  3. #3
    WebProWorld MVP Dubbya's Avatar
    Join Date
    Nov 2006
    Location
    Steinbach, Manitoba
    Posts
    1,323

    Re: How to extract emails from table?

    This seems like a pretty basic query.

    This page should help you get started:

    PHP SQL Select Query and Getting rows

  4. #4
    WebProWorld MVP edhan's Avatar
    Join Date
    Aug 2003
    Posts
    941

    Smile Re: How to extract emails from table?

    Thanks for pointing me the direction, Dubbya. I am checking it out and test to see if it works for me. Will let you know the result.

    Thanks again!
    Find Out More About Renting Thai Amulets For Blessing Of Protection in Well Being & Wealth | Destiny of Fate | Exploring, Understanding & Learning The Basic Feng Shui Art Of Placement To Build Wealth & Harmony With Friends, Colleagues And Family Members In Relationships & Careers... Do you want a better lifestyle? Check it out today!

  5. #5
    WebProWorld MVP edhan's Avatar
    Join Date
    Aug 2003
    Posts
    941

    Re: How to extract emails from table?

    Hi Dubbya

    Well, I have been experimenting with the link you have provided but still can't figure out how to do it. Hope someone can point to an example where I can get started.

    Thanks anyway Dubbya.
    Find Out More About Renting Thai Amulets For Blessing Of Protection in Well Being & Wealth | Destiny of Fate | Exploring, Understanding & Learning The Basic Feng Shui Art Of Placement To Build Wealth & Harmony With Friends, Colleagues And Family Members In Relationships & Careers... Do you want a better lifestyle? Check it out today!

  6. #6
    Senior Member
    Join Date
    Jul 2003
    Posts
    386

    Re: How to extract emails from table?

    It's not really as simple as it first looks.

    The SQL command that you want is
    SELECT emails
    FROM records
    WHERE username in ("peter", "william" )

    You need quotes around the usernames, which you will have to add in via some code.

    Exactly how you acheive this, depends on what you are using to accept input from the user.
    Pete Clark
    Find out what's happening in Spain at http://HotCosta.com

Similar Threads

  1. Extract database code
    By edhan in forum Database Discussion Forum
    Replies: 1
    Last Post: 09-24-2007, 04:31 AM
  2. How to Extract result from xml file?
    By tricker in forum Web Programming Discussion Forum
    Replies: 1
    Last Post: 12-22-2006, 08:49 AM
  3. Extract all resources from any SWF file
    By Decompile_SWF in forum Flash Discussion Forum
    Replies: 0
    Last Post: 10-15-2005, 04:46 AM
  4. Table layout using php/mysql to extract golf statistics
    By daddyg in forum Web Programming Discussion Forum
    Replies: 8
    Last Post: 08-18-2005, 01:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •