Page 1 of 4

connect to mysql database

Posted: Thu Feb 27, 2014 2:21 pm
by Koning Voetbal

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


connect to mysql database

Posted: Thu Feb 27, 2014 2:49 pm
by Maryna Brodina

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).


connect to mysql database

Posted: Thu Feb 27, 2014 3:43 pm
by Koning Voetbal

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


connect to mysql database

Posted: Fri Feb 28, 2014 8:43 am
by Maryna Brodina

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.


connect to mysql database

Posted: Fri Feb 28, 2014 9:13 am
by Koning Voetbal

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


connect to mysql database

Posted: Fri Feb 28, 2014 9:32 am
by Maryna Brodina

connect to mysql database

Posted: Tue Apr 08, 2014 6:54 pm
by Koning Voetbal

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


connect to mysql database

Posted: Tue Apr 08, 2014 7:17 pm
by Kateryna Grynko

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.


connect to mysql database

Posted: Tue Apr 08, 2014 7:31 pm
by Paul Birch

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


connect to mysql database

Posted: Sun Apr 13, 2014 6:29 pm
by Simon Bruce

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