-1

Actually I am developing a web portal for this purpose I need to use the Database API of different servers to access the details of database. I am using JAVA SCRIPT as frontend language and MYSQL as the backend. Please give an example How can I use APIs for this purpose

Thank u in advance

nitesh
  • 411
  • 7
  • 15
  • Long discussion here [http://stackoverflow.com/questions/3020751/can-javascript-connect-with-mysql][1], I suggest to close this one as a duplicate. [1]: http://stackoverflow.com/questions/3020751/can-javascript-connect-with-mysql – Noam Rathaus Jul 01 '13 at 08:21

2 Answers2

1

You cannot. Javascript only has APIs for a limited set of storage frameworks. MySQL is not one of them. You would need some server side language.

Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284
0

JavaScript is client side scripting language. You can't call database using JavaScript. Use any server side programming like Node JS, PHP, Java etc.

Masudul
  • 21,823
  • 5
  • 43
  • 58
  • but my question is that how can I use database API to access database – nitesh Jul 01 '13 at 08:24
  • @nitesh : as Masud mentioned, you need to use server side API and expose it via REST to your javascript. – rkosegi Jul 01 '13 at 08:52
  • @rkosegi : I have servers API then i don't know how to expose it? means how to write program whose using this API please give an example – nitesh Jul 01 '13 at 09:09