This topic is locked
[SOLVED]

 Passing an sql query to a variable

3/29/2018 11:30:09 AM
PHPRunner General questions
P
PaulM author

I want to run a query and pass it to a variable so that I can then use that variable in another query.
$sql="select O_short_code from Office, Office_Staff where OS_O_id=O_id and OS_name='xxxxxxx'";

$short_code=CustomQuery($sql);
I then want to use the variable $short_code in another query but $short_code isn't getting a value.

Sergey Kornilov admin 3/29/2018
P
PaulM author 3/29/2018



Check this:

https://xlinesoft.com/phprunner/docs/dblookup.htm


Thank you, that works perfectly.