Posts Tagged ‘php’

How to Create Multiple Tables in One Statement with MySQL & PHP

Monday, August 17th, 2009

If you are working on a project that force you to create multiple tables in one statement with MySQL & PHP because it is more efficient with your web server, you can try this code out:

PHP Code for Making Multiple Tables

1
2
3
4
5
6
7
8
<?php
$qry = "
CREATE TABLE tablename(fieldname fieldproperties) TABLE TYPE;
CREATE TABLE tablename2(fieldname fieldproperties) TABLE TYPE;
CREATE TABLE tablename3(fieldname fieldproperties) TABLE TYPE;
CREATE TABLE tablename4(fieldname fieldproperties) TABLE TYPE;
";
?>

(more…)