I want to Alter my database table (Add Columns) using query.
I have done this :
This is my first query (Run Successfully) :
$database->pdoQuery("ALTER TABLE tbl_mytable ADD column1 varchar(100)");
This is my second query (gives an error) :
$database->pdoQuery("ALTER TABLE tbl_mytable ADD column2 text");
I have got this error message:
Executed Query -> ALTER TABLE tbl_mytable ADD column2 text
ERROR:"SQLSTATE[HY000]: General error: 315"
Can any one solve my problem? Any help would get appreciated.