Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
johnnyme889
Posts: 3
Registered: ‎12-17-2012
My Device: bold 5

how to integrate my webworks application with php mysql database

I have a website and I am working on a webwork application that I want to integrate with my mysql database on server. I want my webworks app to also query data that is in my database online. Somebody please help me!
Regular Contributor
liammccann
Posts: 68
Registered: ‎06-12-2012
My Device: Blackberry Bold 9780

Re: how to integrate my webworks application with php mysql database

You will need a client side which is your web works application.

Then a server side hosted some where for it to communicate with.

If you want you application to be used without a server side then you will need to use local storage to store and retrieve data.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,

Re: how to integrate my webworks application with php mysql database

On the server side, you'll need to write an API if it doesn't exist already. You could use one of the well known PHP framework to do most of the work.

On the client side, you should go for a framework which offers easy ways of retrieving the information. Sencha offers components that do just that.
--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: how to integrate my webworks application with php mysql database

Any reason why you can't create a PHP app online that does what you need, then create a shortcut app or a chromeless app that loads the web page?

 

I suppose things like GPS location or camera etc... wont work.  If you don't need that it would be easy to do.

If it helped you, click like. :smileyhappy:
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: how to integrate my webworks application with php mysql database

Simply put your webworks app needs to call a script on the server. The server script then returns some results and you do what you want with them.

 

It's a little more difficult than the simple explanation but not too bad

 

Your webworks script sends a POST message to your PHP script on the server. The PHP script handles the query and sends the reply.

 

For the specifics I wrote a quite extensive reply a week or two ago that shows the mechanics

 

My sample only echos whatever you send but can do whatever you like

 

This is tried and tested and works flawlessly

 

I suggest you read up the PHP manual page regarding json_encode() as that will let you return anything you like




Click the like button if you find my posts useful!