Check out example codes for "insert into mysql". It will help you in understanding the concepts better.

Code Example 1

<?php
$servername = "localhost";
$username = "username";

 $password = "password";
$dbname = "myDBPDO";

try {
  $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);

    // set the PDO error mode to exception
  $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    $sql = "INSERT INTO MyGuests (firstname, lastname, email)

   
 VALUES ('John', 'Doe', '[email protected]')";

    // use exec() because no results are returned
  $conn->exec($sql);

    echo "New record created successfully";
} catch(PDOException $e) 
  {
  echo $sql . "<br>" . $e->getMessage();

  }

 
$conn = null;

?>

Code Example 2

INSERT INTO table_name(colomn1,colomn2) VALUES ($1,$2);

Code Example 3

INSERT INTO tbl_name (a,b,c) 
    VALUES(1,2,3), (4,5,6), (7,8,9);

Code Example 4

INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);

Code Example 5

INSERT INTO table_name (column1, column2, column3, ...)
VALUES ('value1', value2, 'value3', ...); 

--Need quotes for strings.

Code Example 6

INSERT INTO table_name (column1, column2, column3, ...)

VALUES (value1, value2, value3, ...);

Learn ReactJs, React Native from akashmittal.com