Re: MySQL - Creating The Database
| From: | Jason Teagle | Date: | Tue, 04 Jun 2002 11:03:05 +0000 |
| Subject: | Re: MySQL - Creating The Database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100542@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "David Freeman" <dfreeman@outbackqld.net.au>
To: "'PHP Mailing List'" <php-general@lists.php.net>
Sent: Tuesday, June 04, 2002 11:50 AM
Subject: RE: [PHP] MySQL - Creating The Database
> Ummm, not sure exactly what you're asking but you can use mysql_query to
> issue the relevant sql commands to create your database and tables and
Am I correct in saying that none of the SQL functions in PHP can actually
create a database file when no file existed before? In other words, an empty
database file must exist before SQL functions can be called on it?
> so on. In cases where I want to package something that kicks off I
> usually create an install script that looks for the database I need and
> if it doesn't exist then create it.
This is the problem - how _do_ you create it? What does your install script
do? Copy a blank template of a DB from a file in your installation package,
or literally create a new file? I have no existing databases to work with...
(what's the file extension for a MySQL-type database anyway [i.e., MS Access
= .MDB, MySQL = ?] ?)
>
> Obviously if you actually want to test code on your development box then
> you're going to need an actual sql server to do it.
That's no problem for me - I'm testing directly on the (remote) host anyway.
Better to test where it's going to be finally then get it all working
perfectly here and find it doesn't work there {:v)
--------------------------------------------
_ _
o o Jason Teagle
< jason@teagster.co.uk
v
--------------------------------------------