Hello, In Shell prompt we can execute this command and get the accurate result
as expected:
server-64:/usr/local/staf # mysql -uuser -puser -ss -e 'use Datebase; select *
from tbl1 where MD5 = md5(“www.google.com");’ ----------------(A)
As you see, the command which mentioned is composed and nested of follow
commands:
server-64:/usr/local/staf # mysql -uuser -puser -------------(B)
//....get into mysql...
mysql > use Datebase; -------------(C)
mysql > select * from tbl1 where MD5 = md5(“www.google.com");
-------------(D)
But I don‘t know how to use STAF to send the request to mysql as follows:
STAF LOCAL PROCESS START SHELL (mysql_shell_name?) COMMAND "use Datebase;"
RETURNSTDOUT STDERRTOSTDOUT WAIT -------------(E)
or
STAF LOCAL PROCESS START SHELL (mysql_shell_name?) COMMAND "select * from tbl1
where MD5 = md5('www.google.com');” RETURNSTDOUT STDERRTOSTDOUT WAIT
-------------(F)
So I tried to use Linux Shell to accept the whole request as follows, but it's
come back result.result is a Numeric string equal HandleNumber at that moment.
That wasn't the expect result(a string as md5('www.google.com')):
STAF LOCAL PROCESS START SHELL COMMAND "mysql -uuser -puser -ss -e 'use
Datebase; select * from tbl1 where MD5 = md5(\“www.google.com\");’ RETURNSTDOUT
STDERRTOSTDOUT WAIT -------------(G)
There is three questions:
1, If it is possible, I want use STAF to manipulate mysql database with step by
step commands( (B) to (F) ). What name of the (mysql_shell_name?) will be
specified?
2, Can we use Linux Shell to accept the request as (G) and get the expected
result? Maybe there is some specifications to format (G) as I don't know about
them, please tell me.
3, If we can't use methods1 or 2 to manipulate database. How can I resolve this
problem? Can you illustrate it.
Thank you.
Bill
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users