I asked similar question before and got some nice code, but i'm concerned with one of comments. I asked how to create and import mysql database from sql file in php on shared hosts. One of commenters said that some hosts might not allow me to do so from php. After digging a bit on other places someone suggested that I could create database from hosts control panel but import it by creating tables via php script executing sql queries this way:
mysql_query("CREATE TABLE `TABLE NAME HERE` (
`id` int(25) NOT NULL default '0',
`CLMN NAME HERE` varchar(250) collate latin1_general_ci default NULL,
`CLMN NAME HERE` int(10) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;");
mysql_query("INSERT INTO `TABLE NAME HERE` VALUES ('VALUE HERE', 'VALUE HERE', 'VALUE HERE');");
Could anyone comment on that? How do I achieve what i'm trying to do if given host will have restrictions on what i can do with databases in php?
(I'm not sure if creating new question for that is appropriate, but i thought that since previous question have good examples of doing it if host isn't blocking everything i'll create separate question for doing the same if host is more restrictive.)