SQL / Scoped query
SQL / Scoped query
nskwortsow
Posts: 120Questions: 0Answers: 0
Hi,
1) How would you formulate:
SELECT UNameF,UCustomerName FROM tblUsers,tblCustomers WHERE tblUsers.ID = SESSSION[ID} AND tblCustomers.f_UserID = tblUsers.UserID
(the goal is to select all the customers of one salesperson).
2) Are PHP sessions compatible with the PHP JSON output? I don't want to show the above output merely with a $_GET parameter...
1) How would you formulate:
SELECT UNameF,UCustomerName FROM tblUsers,tblCustomers WHERE tblUsers.ID = SESSSION[ID} AND tblCustomers.f_UserID = tblUsers.UserID
(the goal is to select all the customers of one salesperson).
2) Are PHP sessions compatible with the PHP JSON output? I don't want to show the above output merely with a $_GET parameter...
This discussion has been closed.
Replies
2. PHP JSON output? As in the string result of encode_json()? Yes you can just assign the value to a session parameter. You don't need to json encode the PHP array - you can just assign the array itself to a PHP session parameter.
Allan