sorry for this question but i’m in using ionic framework , and i want to know how to using an online database in my application
if This database exist on my server
Example what i want to Do
Fetch A Row From database
insert a new row
delete a new row
and son on
sorry for my Stupid , but how to make thing like this
thanks in advance
to send requests and receive data in the form that you like “json” will suit your needs https://www.w3schools.com/js/js_json_intro.asp
…
for the web service you’ll need to write some server side code
like php
Simple to understand: IonicApp -> PHP -> MySQL -> PHP -> Ionic2App
So with your Ionic2App you make a http POST/GET request to a php file.This PHP file connect to your MySQL Database and get the Data you want then print all the Data as Text or Json. And that output will be used in your Ionic2App.
Thats the simplest way to explain it but its also not hard to do it.
Search for:
How to do a http post request in ionic 2
How to do a http get request in ionic 2
How to get data of mysql through php
What is json output format
thank you very much this help me,
by using back& service
i understand the POST/GET http request and i make a provider that use Back& service and http
to work with database , but in my HomePage when i use this providers , say cannot find “provider name”
Ok perfect then Could it be that you have a subfolder like src/providers/backand/backand.ts ? Then it would make sense that this works for you: import { Backand } from "../../providers/backand";
The problem Solved correctly
the solution was
that i was using the same import in App,module.ts and home.ts but i figured that
in App.module.ts i must use : import { Backand } from '../providers/backand';
and in home.ts : import { Backand } from '../../providers/backand';