How to alter a table in mysql to add a new column using PHP?

Use this code to add a new column in existing mysql table:

$query= mysql_query("ALTER TABLE table_name ADD new_column VARCHAR(30)");

table_name is the name of the table. new_column is the new column you want to add.





Show Form
No comments yet. Be the first to add a comment!