I finally got Php/MySQL/Apache all set on Windows 2000 professional
workstation. I'm looking for various php templates that keeps track of
associates, quantity produced, hours for each quantity produced and so on.
Is there such a template out there on the web that I can use?
TIA,
Scott
- Original Message -
From: Scott Hamm [EMAIL PROTECTED]
To: 'Mysql ' (E-mail) [EMAIL PROTECTED]
Sent: Thursday, August 26, 2004 2:37 PM
Subject: Template
I finally got Php/MySQL/Apache all set on Windows 2000 professional
workstation. I'm looking for various php templates that keeps
PROTECTED] wrote on 08/26/2004 02:37:59 PM:
I finally got Php/MySQL/Apache all set on Windows 2000 professional
workstation. I'm looking for various php templates that keeps track of
associates, quantity produced, hours for each quantity produced and so
on.
Is there such a template out
to duplicate the schema of a mysql database. This
seems like it should be a simple task -- taking a 'template' db and
cloning it with a new name.
I've tried things like:
$filename = myDB.sql;
$fd = fopen ($filename, r);
$sql = fread ($fd, filesize
a mysql template database?
Thanks for the reply Bill, however this did not solve the problem. I
still receive the same error with your method as well.
1064: You have an error in your SQL syntax near ';
CREATE TABLE Departments (
DeptID int(10) unsigned NOT NULL auto_increment,' at line 4
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Daevid --
...and then Daevid Vincent said...
%
% Thanks for the reply Bill, however this did not solve the problem. I
% still receive the same error with your method as well.
%
% 1064: You have an error in your SQL syntax near ';
% CREATE TABLE
PROTECTED]]
Sent: Tuesday, December 17, 2002 1:16 AM
To: [EMAIL PROTECTED]
Cc: 'Bill Lovett'
Subject: RE: How can I duplicate a mysql template database?
Thanks for the reply Bill, however this did not solve the problem. I
still receive the same error with your method as well.
1064: You have
: Re: How can I duplicate a mysql template database? [hack]
Hi,
There is an easier way to duplicate a database; from the comand
line, you can run:
mysqladmin create db2
mysqldump db1 | mysql db2
If you want to duplicate the schema only (without the data):
mysqladmin create db2
: Re: How can I duplicate a mysql template database? [hack]
Hi,
There is an easier way to duplicate a database; from the comand
line, you can run:
mysqladmin create db2
mysqldump db1 | mysql db2
If you want to duplicate the schema only (without the data):
mysqladmin create db2
mysqldump --no-data
You mentioned a
echo PRE.$sql./PREP;
in your first post; what do you see?
I see exactly what I expected to see. Basically the contents of a db.sql
file read in that looks like this roughly:
CREATE TABLE table1 (
blah int(10),
foo char(5)
);
CREATE TABLE table2 (
blee int(10),
You cannot execute several SQL statements within a single query.
You are trying to reinvent 'mysql' client batch processing; if you want
to do that, you have to write an SQL parser in PHP that split
your input in independant SQL statements and execute them one by one :(
Daevid Vincent wrote:
You
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Daevid --
...and then Daevid Vincent said...
%
% You mentioned a
%echo PRE.$sql./PREP;
% in your first post; what do you see?
%
% I see exactly what I expected to see. Basically the contents of a db.sql
% file read in that looks like this
I need to use PHP to duplicate the schema of a mysql database. This
seems like it should be a simple task -- taking a 'template' db and
cloning it with a new name.
I've tried things like:
$filename = myDB.sql;
$fd = fopen ($filename, r);
$sql
you don't have to
bother with all that quoting.
-bill
Daevid Vincent wrote:
I need to use PHP to duplicate the schema of a mysql database. This
seems like it should be a simple task -- taking a 'template' db and
cloning it with a new name.
I've tried things like:
$filename = myDB.sql;
$fd
template found for user our_guest
Has anybody seen this behavior?
Nick
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request
15 matches
Mail list logo