Do you have permission to create tables (I would assume so)?  Can you run
any successful queries (i.e. not using the file upload)?  If so, you might
need to check your configuration file, or you might have some file size
limitations, as I mentioned in my previous email.

-----Original Message-----
From: Todd Cary [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 06, 2005 8:57 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Using PHP to import a DB

Robert -

I used the backup file on my desktop computer and the browse button. 
After the upload was over, I got this message:

Your SQL query has been executed successfully:
The content of your file has been inserted. (sfyc_data_20051105.sql: 
11111 Instructions)

However the tables were not created in the DB.  I must be missing 
something simple here!

A sample of the backup file is as follows:

CREATE TABLE ACCESS (
   AC_REF int(11) NOT NULL auto_increment,
   AC_MEMBER_NUM varchar(10) default NULL,
   AC_TYPE varchar(15) default NULL,
   AC_CHANGETIME timestamp(14) NOT NULL,
   PRIMARY KEY  (AC_REF)
) TYPE=MyISAM;

--
-- Dumping data for table 'ACCESS'
--


INSERT INTO ACCESS VALUES (2230,'441','VIEWMEM',20040521111332);

Todd
Robbert van Andel wrote:
> You could run a system command from the web browser to import the text
file.
> If you have access to PHPmyAdmin, you could use it to then import the
file.
> Or finally, you should be able to read the contents of the file into a
> variable (if it's small enough) and then run the query using mysql_query.
> 
> My personal preference is phpmyadmin.  It's a very good database interface
> and can be retrieved from http://www.phpmyadmin.net/home_page/
> 
> Robbert van Andel 
> 
> -----Original Message-----
> From: Todd Cary [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, November 05, 2005 4:02 PM
> To: php-db@lists.php.net
> Cc: Chris Herron
> Subject: [PHP-DB] Using PHP to import a DB
> 
> My client switched from a dedicated server to a shared server, so I 
> cannot use the command line to import a DB that was produced with 
> mysqldump.  Can I duplicate "mysql -u user -p db < /tmp/mydb" with php?
> 
> Any suggestions are greatly appreciated....
> 
> Todd
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to