Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7776445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:53:10+00:00 2026-06-01T17:53:10+00:00

How do I do that? I have a table with,at the moment, 3 members.

  • 0

How do I do that?

I have a table with,at the moment, 3 members. For each one of these members I want to add a row to another table. Should I use a while inside a while? Or a Foreach loop?

This is what I have so far.

$sql = "SELECT email FROM members";
$query = mysql_query($sql);

while ($row = mysql_fetch_assoc($query)){

// Do I add a new while in here? Do I use a for loop?

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:53:12+00:00Added an answer on June 1, 2026 at 5:53 pm

    based on your table info :

    while ($row = mysql_fetch_assoc($query)){
    
     mysql_query("insert into aanwezigheid set email='{$row['email']}', 
       date='{$your_date_var}',
       city='{$your_city_var}',
       address='{$your_address_var}'" );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say that we have one table with a field called sales_total and another
I have one table, e.g. pricerules, that have stored special prices by article for
I have a table full of items that each have a unique ItemID .
I have a table with several million rows. Each row represents a user session
I have a table with around 100,000 rows at the moment. I want to
I have a table 'comment', investigation that has a field referencing another table 'sf_guard_user'.
I have a table that is quite modest in size at the moment but
I have a table with data relating to several moments in time that I
I have a table that have sigh in and sign out value **id Date
I have some table DOCUMENTS that have a column TYPE_ID and a table named

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.