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 7998307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:10:58+00:00 2026-06-04T15:10:58+00:00

Hello. I need help with doing a mysql select, where the values in wins

  • 0

Hello. I need help with doing a mysql select, where the values in wins is higher than lets say 100 ? So it selects only the users who have had more than 100 win’s

Then i need to inserts each one into a table.

Here is what i have so far

<?php
// i have toke my connect out


// Get all the data from the "example" table
$result = mysql_query("SELECT * FROM users") 
or die(mysql_error());  

echo "<table border='1'>";
echo "<tr> <th>username</th> <th>wins</th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
    // Print out the contents of each row into a table
    echo "<tr><td>"; 
    echo $row['username'];
    echo "</td><td>"; 
    echo $row['wins'];
    echo "</td></tr>"; 
} 

echo "</table>";
?>

I am guessing id need a were statement ? Saying select were wins > 100 ? I have done loads of select were’s be for but never select were is over. I also will need to insert each one of the results into another table called rewards

  • 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-04T15:10:59+00:00Added an answer on June 4, 2026 at 3:10 pm

    Your current query SELECT * FROM users will give you ALL data that is present in your table.

    To get the data where wins > = 100 just add this condition so that new statement will be

    SELECT * FROM users where wins >= 100

    To insert into rewards table (considering you have fields as username, wins) use below

    insert into rewards 
    (username, wins) 
    select username, wins 
    from users 
    WHERE wins >= 100
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I need some help getting my mysql correct. I need to select one
I need help displaying only text from within a file that begins with lets
Hello i am new in android and i really need help with something. I
Hello I need help with Regular Expression, I want to match each section (number
Hello I need some help with a bug in Internet Explorer 9. I am
Hello i need help on PHPMailer here is my code : $message = 'main
Hello freinds I need help as to how can I add 2 iFrames in
Hello everyone i need some help. I'm trying to make an application for mac
hello guys i need small help in understanding file system of android Now in
Hello stack overflow I need help with this problem. Ok, I have a flat

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.