0

I know that direct access to a database via Javasript is not recommended, since the user would get the database login and thus the ability to manipulate the database.

But in my case, the user cannot see the client-side code, since it's a phonegap app.

Is there a way to do it? And it not, what is a good way to do with a serverside part?

asked Apr 27, 2015 at 9:59

1 Answer 1

1

its really not recommened to access database from client-side its not only for security reasons, but what if you changed the database access or upgrade to different database, so you will have to change it in your app which you may not be able to access again after users installed if its mobile app and then you stuck to your database for ever,

so whatever you want to do you can add an action in server-side and depend on your params it will formulate your Query,

for example sending parameter for user=true this will search for users tables, sending parameter for account=true will search in users-accounts tables and so on.

answered Apr 27, 2015 at 11:09

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.