Giter Club home page Giter Club logo

dbbhinstaller's Introduction

dbbhInstaller

Simple PHP installation scripts.

It get config_install.php file and ask user for its parameters with // comments as the fileds names of the parameters.

After submit button is pressed, the second phase analise config_install.php file again and add the values to the variables that user enter in the form at the first phase. The result is stored to the config.php if it doesn't exists.

Then it execute db.sql replacing the $PREFIX$ in the SQL file with $db_prefix from the config.php file.

Samples

// Database connection parameters
$db_host = 'localhost';      // Database server address
$db_user = 'user';      // Database server username
$db_password = 'password';  // Database server password
$db_database = 'database name';  // Database name
$db_prefix = 'DBBH_';    // Database tables prefix

The first line // Database connection parameters will convert to the header Database connection parameters.

$db_host = 'localhost'; // Database server address will convert to the Database server address text with input text box following it. The name of the input box will be db_host. Other lines will convert to the input text boxes the same way.

These parameters are using for initial database connection. If they are not set in the configuration, the script may fail to run. But if you don't need them - delete the db.sql file. In this case only config.php will be stored and no database manipulations will be made.

db.sql file contents

This file should contain only SQL queries.

One query - one line!

create table $PREFIX$test (id int, name varchar(20))

create table $PREFIX$test2 (id int, name varchar(2))

You can use empty line to separate the queries.

The $PREFIX$ will be replaced with the value of the $db_prefix parameter.

dbbhinstaller's People

Contributors

debobaher avatar

Stargazers

Rihards Mantejs avatar KNicole CEO avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.