Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/02/2011, 18:35
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 10 meses
Puntos: 416
Respuesta: Instalar Base de datos con PHP

Es solo cosa de ejecutar la consulta correspondiente, si por ejemplo quieres ejecutar:
Cita:
CREATE TABLE
`id` int(11) unsigned not null auto_increment,
`foo` varchar(255) not null,
`bar` varchar(255) not null,
PRIMARY KEY (`id`)
) ENGINE=MyISAM charset=utf8 collation=utf8_unicode_ci;
Metes eso en una variable y lo ejecutar con mysql_query()
Código PHP:
$var 'CREATE TABLE
`id` int(11) unsigned not null auto_increment,
`foo` varchar(255) not null,
`bar` varchar(255) not null,
PRIMARY KEY `id`
) ENGINE=MyISAM charset=utf8 collation=utf8_unicode_ci;'
;

mysql_query($var); //ejecutar consulta