Multiple Line SQL for MySQL?
preid at reidit.co.uk
Wed Mar 23 05:45:06 CST 2005
Does anyone know whether Rev supports multiple-line SQL command
execution with MySQL?
I have a Rev 2.5.1 project that is trying to create and populate a
new database based on an existing template database. I have used
phpMyAdmin to dump a SQL script to a text file from a template
database containing the SQL commands to construct all the tables and
data I require. However, I can't find a way of sending this script
to MySQL using Rev? (I can read the file into a text container, but I
can't feed this to the MySQL server using the revDB support commands
If I use revExecuteSQL command (or equivalent function
revdb_execute), I can send a single SQL command only. If I try to
use this inside a "repeat for each..." loop to work through a text
object that contains multiple commands, then I hit a problem with any
commands that have been laid out across several physical lines (as
you get from phpMyAdmin dumps!).
I really don't want to have to parse the SQL dump statements myself
and convert each long multi-line command into a long single-line
command just so I can use revExecuteSQL! Nor do I want to use a
shell() command as this is a client-server application with the code
running on a client and the MySQL server running on a server on the
same local network.
Any suggestions please?!
Reid-IT Limited, Loughborough, Leics., UK
E-mail: preid at reidit.co.uk
More information about the use-livecode