Mysql - multiple queries in one line

hi,

simple question... is it possible to send to MySQL ... 2,3.. queries in one single line (topic) ?

eg:
msg.topic = "select 1 ; select 2; select 3;" // .. of course here I'll have something more complex...

if I send that, I receive in payload:
array[3]
0: undefined
1: undefined
2: undefined

Thanks,

D.

I don't believe it is possible as you have written it. What do you want to get back? Each select would return an array of records, so are you hoping to get an array of three (one for each select) where each element is itself the array recordset from the select?

kind of .. I would expect in a complex example ..to receive 2-3 arrays of different length and values, of course.

another example ..one query/array with device_details... and one query/array with device_type_details.

I could do that in 2-3 steps (in cascade) ..easily...but I just want one round to DB ! not 2 (or 3)

No, I don't think you can do that. In fact I don't think the DB can do that in one go can it?

You haven’t shown us rather actual queries - ie are they of the same table - but you should look up ‘MySQL or’ and see if that would work for you

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.