21 Sep
2015
21 Sep
'15
10:21 a.m.
2015-09-21 12:51 GMT+03:00 Dancer New <dancerfan2015@gmail.com>:
I want to make sure each user only see their own data. .... If I don't use one database connection for each user, how can I make sure the database handler know which user it is dealing with?
I assume, that in your database all records have a field for the owner? Then you can build up your queries so that data is filtered appropriately. Like "SELECT * FROM table WHERE owner = 'john'". Or if everyone have their own table or even schema, you can build your queries up counting on username. It is easier to deal with it on application level, mostly. Wbr, -- Kõike hääd, Gunnar