Koning Voetbal
Posts: 0
Joined: Thu Feb 27, 2014 2:21 pm

connect to mysql database

Hello,

I have an excisting website with some MySQL tables within, eg a user table for login users etc

I want to make an app which uses these data from the MySQL table so users can login into the app.

Is this possible?

I read something abour REST API but is there another way?

I know my way around MySQL and PHP but I'm not a wizard with REST API's .....

I find some erly questions about connectiong to MySQL but none of them give me a clear answer, only that it's possible ...... ;-)

Hopefully someone can get me on the right track!

Kind regards,

Arie

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

connect to mysql database

Hello! It's easy to implement REST API on your site. When your site is called with some URL (it's up to you what is the URL it would be), with any method (GET, POST, PUT, etc.) your site gets some parameters. Your site should process these parameters and give back result (for example json string).

Koning Voetbal
Posts: 0
Joined: Thu Feb 27, 2014 2:21 pm

connect to mysql database

Tnx for the quick answer!

As I said, REST API is not (yet) my thing .......... ;-)

The website is http://www.wijhoudenvanvoetbal.nl, then I could take the url http://www.wijhoudenvanvoetbal.nl/res... ?

How and where does I make the connection between Apperyio and the database?

Should there be a php file in the map http://www.wijhoudenvanvoetbal.nl/res... ?

Kind regards,

Arie

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

connect to mysql database

Hello!
[quote:]could take the url..[/quote]yes, please take a look here for more information http://en.wikipedia.org/wiki/Represen...
[quote:]How and where does I make the connection between Apperyio and the database?[/quote]from app created with Appery.io you can send requests to your server. Server gets and process retrieved data and respond with json string. Here is how connection works.

Koning Voetbal
Posts: 0
Joined: Thu Feb 27, 2014 2:21 pm

connect to mysql database

Here is how connection works. ....... is there an URL? ;-)

Koning Voetbal
Posts: 0
Joined: Thu Feb 27, 2014 2:21 pm

connect to mysql database

I'm still having problems connecting from Appery to our mysql database ...... :-(

As I understand you connect from Appery to a php file in which you give all the database query's. How to get this results to appery?

Any help would be appriciated!

Kind regards,

Arie

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

connect to mysql database

Hi Arie,

You should process queries on your server (GET or POST method) and then create a REST service for work with your service, as Maryna advised.

Paul Birch
Posts: 0
Joined: Mon Nov 11, 2013 10:06 pm

connect to mysql database

I have the same setup, an existing php site using a MySQL database.

What you need is a REST API to act as the middleman between your db and the app. No REST API = no function.

What is working for me is a customized php-based rest api. It's now interacting very nicely with appery, but like you I was api-challenged = it definitely took me some time to research and $$ to customize and get working.

Paul

Simon Bruce
Posts: 0
Joined: Sun Apr 13, 2014 6:29 pm

connect to mysql database

Hi Arie,

Did you get a solution to connecting to a MySQL database. I'm looking to develop a couple of apps for personal use linking to a MySQL database on Godaddy and I'm finding it difficult to get a straight answer to the problem. I've learnt PHP and MySQL from experience and know enough for what I want but I'm not a developer. The training docs seem good but they do not help on this subject.

Regards,

Simon

Return to “Issues”