5pence Posted March 29, 2007 Share Posted March 29, 2007 Hi Guys, Is it possible to create a mySQL table from a .php file? If so how? Thanks Link to comment https://forums.phpfreaks.com/topic/44839-solved-create-a-table-in-mysql-from-a-php-file/ Share on other sites More sharing options...
jguy Posted March 29, 2007 Share Posted March 29, 2007 YES!!!!!!!!!!! something like: $sql = "CREATE TABLE mytable( partno CHAR(10) NOT NULL, descript CHAR(60) NOT NULL, cost DOUBLE(10,5) NOT NULL, user CHAR(15) NOT NULL, modelno CHAR(20) NOT NULL, PRIMARY KEY(partno))"; $result = MYSQL_QUERY($sql) or die ("Invalid create"); Link to comment https://forums.phpfreaks.com/topic/44839-solved-create-a-table-in-mysql-from-a-php-file/#findComment-217755 Share on other sites More sharing options...
5pence Posted March 29, 2007 Author Share Posted March 29, 2007 Thankyou very much indeed Link to comment https://forums.phpfreaks.com/topic/44839-solved-create-a-table-in-mysql-from-a-php-file/#findComment-217758 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.