Hi people,
I have created a small offline program. How can I quickly install the database on someone Else's computer from a php file.
" databaseinstall.php "
So when they view that in their browser it sets up the database.
I have the database dump information.
Code:
-- phpMyAdmin SQL Dump
-- version 3.1.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 30, 2009 at 10:34 AM
-- Server version: 5.1.30
-- PHP Version: 5.2.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `name`
--
CREATE DATABASE `name` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `name`;
-- --------------------------------------------------------
--
-- Table structure for table `veges`
--
CREATE TABLE IF NOT EXISTS `veges` (
`id` int(2) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`M` tinyint(2) NOT NULL,
Will I have to type everything up with php, running queries? or is there a faster way to do this straight from the SQL file?
__________________
Websites Created;
warscope.com
ratepayers.org.nz
Last edited by lothop; 05-29-2009 at 10:48 PM..
|