What is the correct syntax for defining an auto-increment primary key in a MySQL table using PHP?

When defining an auto-increment primary key in a MySQL table using PHP, you need to include the "AUTO_INCREMENT" attribute in the column definition for the primary key field. This attribute will automatically generate a unique value for each new record inserted into the table. Additionally, you should specify the primary key constraint using the "PRIMARY KEY" keyword.

// Define a MySQL table with an auto-increment primary key using PHP
$query = "CREATE TABLE table_name (
    id INT AUTO_INCREMENT PRIMARY KEY,
    column1 VARCHAR(50),
    column2 INT
)";