Re: php script to create mySQL database programmatically
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Tue, 31 Oct 2006 07:51:33 -0500
mistral wrote:
"Jerry Stuckle писал(а):
"
mistral wrote:
Need php script to create mySQL database programmatically; since
hosting configuration may not allow create database from script, script
also need eliminate/rewrite all restrictions in appropriate places in
that hosting.
You can make a script to create a database. But you can't make a script
which will hack the host's security settings.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
======================================
Need working code to create database programmatically via PHP.
M.
Not a problem. Here are some links to get you started:
For the SQL you need:
http://dev.mysql.com/doc/refman/5.1/en/create-database.html
http://dev.mysql.com/doc/refman/5.1/en/create-table.html
And optionally:
http://dev.mysql.com/doc/refman/5.1/en/create-index.html
From the PHP end, check out:
http://www.php.net/manual/en/function.mysql-connect.php
http://www.php.net/manual/en/function.mysql-create-db.php
http://www.php.net/manual/en/function.mysql-select-db.php
http://www.php.net/manual/en/function.mysql-query.php
http://www.php.net/manual/en/function.mysql-close.php
And for error processing, you'll want:
http://www.php.net/manual/en/function.mysql-error.php
This should get you started.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- References:
- php script to create mySQL database programmatically
- From: mistral
- Re: php script to create mySQL database programmatically
- From: Jerry Stuckle
- Re: php script to create mySQL database programmatically
- From: mistral
- php script to create mySQL database programmatically
- Prev by Date: Re: Faster read of filenames
- Next by Date: Re: Faster read of filenames
- Previous by thread: Re: php script to create mySQL database programmatically
- Next by thread: Re: php script to create mySQL database programmatically
- Index(es):
Relevant Pages
|