JCRM <<Pike[at]quick-hacks.co.uk>> wrote:
> But from Hilfe:
>> object db;
>> db=Sql.Sql("mysql://root:dbadmin@/test");
>> int v=3;
>> db->query("CALL `test.example`(%d)",v);
What this does is simply format an sql query using an sprintf style
format string, i.e. what you send is "CALL `test.example`(3)". If you
want a settable variable you'd have to use "SET @v=..." and
"SELECT @v" statements over the sql connection in pike just as you did
in the mysql client.
> big_query(): Query "CALL `test.example`(3)" failed (PROCEDURE
> sslprov.test.example can't return a result set in the given context)
I'm not sure what that message means, but I know that the mysql glue
in Pike currently doesn't support multiple return values. However I
wouldn't think it'd trig an error, only that you wouldn't be able to
get more than the first result set (i.e. result1 in your example).
|