[dancer-users] how to make sure one db connection per user
WK
wanradt at gmail.com
Mon Sep 21 11:21:03 BST 2015
2015-09-21 12:51 GMT+03:00 Dancer New <dancerfan2015 at 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
More information about the dancer-users
mailing list