Re: Moving Data Between Proprietary Database and MySQL

2002-05-23 Thread Avalon


Hello,

> Because most web providers will not allow
> direct TCP/IP access to
> MySQL servers, I am considering the following
> strategy:
>
> a) Save the proprietary database to a file
> containing a series of SQL
> CREATE TABLE and INSERT INTO calls.
>
> b) Upload the SQL file to the server via FTP.
>
> c) Launch a PHP script on the web server from
> my program that executes
> the SQL file to insert the data into the MySQL
> database.

Have you tried phpMyAdmin? It's a web-based 
administration tool written in PHP to handle mysql 
databases.

Check http://www.phpwizard.net/projects/phpMyAdmin/

> Another issue I am running into is the
> difference between the
> proprietary database and MySQL in how quotes
> are escaped. The
> proprietary database wants two sequential quote
> characters, MySQL uses
> a backslash before the quote character.

You can do this with a simple search & replace. Does 
the other database provides any means to do it in the 
query itself? i.e., in mysql you can query like this:

SELECT replace(some_field, ',', '.') FROM some_table

This query substitutes commas (,) for periods (.) for 
some_field.

If you'd like to loose your sanity, you could start 
having lots of fun with strings, like this:

SELECT concat('INSERT INTO TABLE_X (field_1) VALUES 
(''', replace(some_field, ',', '.'), ''');');

and you can send the result to a text file. this way 
you are building a script using a query.


Hope this helps!


>
> Has anyone else gone down this road before? Any
> comments on this
> strategy? Are there any tools or routines
> available to help facilitate
> this process?
>
> --
> Bruce Vander Werf
> [EMAIL PROTECTED]
>
> -

> Please check
> "http://www.mysql.com/Manual_chapter/manual_toc.html";
> before
> posting. To request this thread, e-mail
> [EMAIL PROTECTED]
>
> To unsubscribe, send a message to the address
> shown in the
> List-Unsubscribe header of this message. If you
> cannot see it,
> e-mail [EMAIL PROTECTED]
> instead.
>
> 




~avalon~

-
Email Enviado utilizando o serviço MegaMail

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Mysql too slow over the LAN

2002-05-21 Thread Avalon


Hello,

I have built an application that connects to a mysql 
database located on a remote server in our LAN.

When running the application locally on the server and 
I open the main window (it as several forms and does a 
lot of queries to fill the fields, etc.) it takes 
about 2 to 3 seconds to open.

However, when I use this application on some other 
client in the same LAN, this form takes about 20 to 30 
seconds to open!

Can someone help me with this?

Thanks.

-
Email Enviado utilizando o serviço MegaMail

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php