MySQL form shell()
David Bovill
david.bovill at opn-technologies.com
Mon May 6 14:51:01 EDT 2002
OK the way I'm doing it at the moment is to pipe SQL from MC into MySQL
using the shell() command - not sure if there is a better way but this works
without having to use php or another intermediate scripting language.
function executeSQL someSql, mySqlHost, userName, password
put "| mysql -h mySqlHost -u userName -p" & password into pipeToBatchMySQL
put "echo '" & someSQL & "'" && pipeToBatchMySQL into mySqlShellCommand
put shell(mySqlShellCommand) into buffer
return buffer
end executeSQL
Any comments on how to improve this appreciated.
More information about the metacard
mailing list