Question: PHP Create a new text file. When doing the assignment, copy all the MySQL commands you used to complete the assignment from start to finish

PHP Create a new text file. When doing the assignment, copy all the MySQL commands you used to complete the assignment from start to finish into the text file.

Create a demographics database with a table that contains the following fields: country, primary language, and population. Enter records for at least 10 countries. You can find demographic information for various countries in many places on the Internet, including Wikipedia (http://www.wikipedia.org/). Write queries that return the following:

  • A list of all records sorted by country name
  • The country with the highest population
  • The country with the lowest population
  • Countries that share a common language, such as French

This is the coding that I have so far in a text file... I guess I'm kind of confused.. do you think that I should add the MySQL commands at the end of my text file? If so, could anyone help me with that?

Countries

Insert data into MySQL using PHP

country:< inputtype = "text" name = "country"/> primarylanguage: population:

mysql_Select_db("DB-id", $con);

$sql = " INSERT INTO table( Country, planguage, population) VALUES ('$-POST[Country]', '$-POST[planguage]', '$-POST[population]')";

if(!mysql_query($sql,$con)) { die('Error:'.mysql_error()); }

echo "1 record added";

mysql_close($con)

?>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!