Avatar of namsu55
namsu55
Flag for United Kingdom of Great Britain and Northern Ireland asked on

PHP Web Service with MYSQL

I can use DOM fine in PHP to manipulate XML and display it properly. My question is how could I implement this web service that could take in search from the form and collect the data from the mysql, transform it into an XML file and maintaining some sort of pagination.
PHP

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
namsu55

ASKER
Note I already have search implementation from MYSQL and pagination how ever I am interested in web service.
SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
namsu55

ASKER
Just trying to learn web services. I want to make a php web service where I can produce an xml file from mysql result, and then maybe try in future to merge results from another similar service together, based on the same XML. The reason why I talk about pagination is because we use it with all searches and im not sure how I would use MYSQL and XML to do this. Would I have to put all search results in XML or like the 10 links per page limit put 10 links into XML and then use that.
ASKER CERTIFIED SOLUTION
dischob

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Ray Paseur

Pagination is usually used in the HTML output from a query - for example, if a query is giving you hundreds of rows in the results set, you would break up the output to create smaller web pages.

I have nothing against SOAP, but I am a bigger fan of RESTful interfaces.  In the REST model, you give all the signals in the URL query string and the web service returns the responses has a string, probably CSV or XML.  A good example is the Yahoo API discussed here:

http://developer.yahoo.com/maps/rest/V1/geocode.html

The advantage of the REST approach is that you do not have to know anything about how the web service works.  This makes the calling sequence much simpler.

Best regards, ~Ray
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23