Archive
Highlighted

Passing mysqlquery output to sub mysqlquery

Engager

I have two tables:

  • subscriber;
  • blocks;

The subscriber table contains a field called 'sid', which is a company wide known service ID. And an 'íd' field. In the blocks table again I have the 'id' field and a 'number_block' field.

Since I only know the sid, I'd like to be able to do a mysqlquery (using the mysql connector) on a specific sid. This needs to return the correct id whit which I than can select the corresponding number_block fields.

I currently have the following two searches:

  • |mysqlquery spec=db query="SELECT id FROM subscriber WHERE sid='152571';" (this wil return value 'X'
  • |mysqlquery spec=db query="SELECT number_block FROM blocks WHERE id='X';"

How can I parse the output from the first query to the second query?

0 Karma
Highlighted

Re: Passing mysqlquery output to sub mysqlquery

Path Finder

Why are you not joining on sql?

View solution in original post

Highlighted

Re: Passing mysqlquery output to sub mysqlquery

Engager

Wow! That totally answered my question! You rock man! You must be some sort of a K(on)ING!!

0 Karma