donboe — 2014-07-05T07:35:34-04:00 — #1
I have the following query on a page:
$bericht = "SELECT bericht_id, // mesage_id
bericht, // message
verzonden // sended datetime
I don't need these values in a loop, I just need these values for three other queries. So how do I create variables from these values to use in three other queries on the same page?
Thank you in advance
solidcodes — 2014-07-05T15:08:05-04:00 — #2
Well, how about create a class.
and inside that class you have three methods and each method has query codes in there.
And you put those values in global scope.
and call them using those three methods.
lorenw — 2014-07-05T20:34:49-04:00 — #3
You have no WHERE clause so without a loop, you must only have 1 row, just hard code it.
scallioxtx — 2014-07-06T07:51:26-04:00 — #4
Wouldn't is be easier to JOIN the other queries against the values you need?
Makes a lot more sense to me than performing separate queries.