I have found many places online that say in order connect to a remote MYSql database, use php. I do not know how to get from my iphone app, to php, to mysql and back. I cannot seem to find anything on the relationship of these things. I would really really appreciate any help in this matter. Where do I write the php code? Where do I call it? When do I connect to the remote server. I am new to this task.
please help
Thanks
To try and answer the question, the way this kind of access works is that you would create a web service with PHP code on a web server. This accesses the MySQL database. Your iPhone application would then make a request to your PHP web service and handle the results.
Perhaps you would find this tool of use. I'm involved in a project for allowing you to manage a hosted MySQL database, create a web service layer for it, and build a customised client library that helps you consume the results on the iPhone. The project has just gone into an open beta programme.
It's called Kumulos and it removes all the tricky, repetitive stuff associated with creating database driven apps. We're looking for beta testers and would love to hear your feedback!
You can take a look at the project here: Creating iPhone MySQL databases with Kumulos
I hope this has been of some use, thanks,
Chris
Related
this is my first time using StackOverflow and I don't know how this works but I'll be quick and short. So, I'm in an internship and I'm learning Angular and I only know the basics. They told me to make a simple project so I can understand the basics of Angular by making a task manager and using as Database PHPmyAdmin and of course PHP language. I did the database and I'm using Postman to get the HTTP request as the company colleagues told me to use. I want to understand if it is possible to make the database connection to Angular and how.
No because there's no such thing as a "phpmyadmin database".
Phpmyadmin is a tool for interacting with a mysql/mariadb database management system which will contain one or more databases.
Meanwhile angular is a toolkit/framework/library for writing JavaScript code to run in a browser. Browsers communicate with servers using http. Mariadb and mysql don't speak http. You need to build something serverside to bridge the http to the DBMS. You appear to be using PHP serverside already for this but there are lots of other languages.
Total beginner question (apologize in advance for the stupidity :( )
I am trying to learn how to develop apps using ionic framework/angular.
I created a simple news feed (UI part of it anyway).
I then installed MySQL, PHP and Apache on my Mac (MAMP). I have created some tables and inserted some dummy data.
Now, I am completely lost on what kind of routine/procedure to write on my server, and what code to write in my Angular service so i can show the dummy data in my app?
Basically, how do these two discreet "things" on my system know how to connect and exchange data?
I googled it for few days, but most tutorials don't seem to address this basic question.
I don't actually expect somebody to take me through the steps, but if you can point me to some tutorials/resources on this, it would be much appreciated.
Thanks in advance.
You will have to think in terms of web/RESTful services to expose data to your Angular app. I can point you to a couple of introductory tutorials on the MEAN stack (MongoDB, Express, Angular, Node), but you'll get the idea:
Learn to Build Modern Web Apps with MEAN
Mastering MEAN: Introducing the MEAN stack
Several references to online resources, by ericdouglas
Since you are using AngularJS, your frontend app is a single-page app I suppose. All data your frontend app based on is provided by your backend, here is PHP/MySQL.
You need to use PHP to create a REST service to provide JSON data, which can be consumed by AngularJS app. While MySQL is behind your PHP app as a storage provider, it doesn't talk to your AngularJS app directly.
I am currently starting on a project for school where we are to make a prototype for an application that uses PHP and SOAP to access a Dynamics CRM server.
So far I've gotten my apache server up and running and a project set up in Netbeans, simple .php files work just fine...
Now I'd need a similar database as is used in a MS Dynamics CRM system that I can run locally (so no network connection or configuration is required). Connection to the actual database (of the company we make the prototype for) is impossible.
An SQL server would be the easiest option I know of (according to a post here MySQL is incompatible with the dynamics database so that's not an option) since we have used this in class already, but is this a comparable database to the one used in Dynamics CRM?
This assignment is slightly out of my league since I have had no experience with PHP or SOAP coding, but then again we only need to simulate a couple of simple insert/update/delete/... statements - only problem being I have no idea how I should simulate their database.
Thanks in advance for you help, feel free to ask any extra questions if you need more information
Just having a database isn't going to be enough here. Dynamics CRM is the application which has the SOAP web service endpoint and then performs any actions on the database.
You cannot just run SOAP calls directly against the database and you should not be directly editing the CRM database - its not supported by Microsoft.
What you really need is a full development environment - CRM, SQL, AD the whole setup.
So traditionally you might go for a local server with CRM On-Premise, SQL and all their prerequisites installed, not a cheap option and it sounds like it might be beyond your current resources.
So my suggestion would be to go for CRM Online - basically Microsoft host everything and you access CRM via the web. CRM Online is basically the same as CRM On-Premise, there are some key differences but you will be able to perform all your SOAP calls against a real working CRM.
Even better CRM Online has a 30-Day free trial, after that its a $44 a month per user, but as I understand you can just keep creating more free trials.
Also you then need to get your clients customisations installed on the environment. You can export those from CRM and import them into your development environment. You can do this without taking an live data - which is probably why the client doesn't want to give you their database. The reason this is important is so you have the correct data model which is very important for the SOAP web service calls.
In regards to the PHP SOAP bits you might want to have a look at: PHP MSCRM, I haven't used it myself but it looks useful.
As a side, you may want to look at the OData endpoint of MSCRM you may find it more straightforward to use from PHP.
What is the best way to connect an android application and a php server using sockets? I am trying to implement a chat system between multiple clients, but I know that PHP does not allow multithreads.
Sorry for not giving enough information about what I intend to do. I basically want to create an app simmilar to google latitude, and I also want to implement a chat system between the users. I have aldready decided that I am going to use a MySQl DB and therfore a PHP server so the client communicates with the DB using JSON for data exchange. I am quite new to this and I don't know how the architecture Client-Server-Client communication should look like. I found out that the easiest way to do this is using HTTP requests, but I don't know how I should implement this.
I think you can use jabber protocol, install any xmpp server and you can connect to that from android, this is standard for chat applications
use xml-rpc base php webservices for chat server. your chat client will contact to chat server throught web services.
*I was going to make this a comment but I ran out of space, plus it does have some answer-y qualities to it.
This question does not contain nearly enough information for anyone to usefully help you. How do you think it should be done? You can't ask people to critique an idea when you haven't told them what your idea is.
PHP is the wrong language for this, because (as you rightly point out) it can't be multi-threaded - amongst a multitude of other reasons. I personally would recommend Node.js (or possibly Java), but that's just my preference.
If you still insist on using PHP, take a look at this. It might give you a point in the right direction for a non-blocking multi-IO setup such as this - but you're letting yourself into a whole world of unnecessary complication by doing this in PHP.
I'm creating a website using PHP and MySQL, and I'm trying to add some Silverlight stuff to the site. I need the users to be able to do stuff in the Silverlight app, and for that data to be saved in the MySQL database. I'm wondering about how I could do this...
Can I get the client side Silverlight app to log in to the server side MySQL database? Would this be a security risk? And if it's possible, how would I do it?
Or is there a better way anyone can think of? And any ideas how I'd implement it?
Thanks everyone! :)
No you should not have the app interact with your MySQL database directly. In this type of situation you will need to implement some form of web service, which exposes your data to the client. The Silverlight client code will then send requests to the web service, which runs on the server and has access to the database. Using a Microsoft technology on the server will make this a lot easier, because the IDE will do a lot of the wiring up for you, but I'm sure it could be done with PHP as well.
I would look into how to create a PHP, REST or SOAP based webservice and go from there.
Here is a video explaining how to consume the service, once you have that sorted out on the server.
http://silverlight.net/learn/videos/silverlight-videos/http-communication/