Get data from mysql using php (API)

Hello guys,

Can I get data from MySQL using PHP and display it on the server using JavaScript and API?
Does anyone try that?

Thanks

1 Like

I mean you could, yes, but why wouldn’t you just use SQL inside of your resource instead of having to remote get data?

1 Like

If you want to make some kind of website to display data based on MySQL stored records then yes, you can use PHP as one of the many back-end languages.

However if you want to go Resource → Webserver → Resource, then I advise you use MySQL on server-side code only, and make sure to protect the queries. As you should never trust the client.

There are already existing resources like mysql-async which will help you make such queries.

1 Like

That’s it mate, thanks !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.