Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 11    Views: 265

alexsamson
I hate code!
Profile
Posts: 8
Reg: Dec 04, 2012
Telford
2,030
12/12/12 03:41 AM (13 years ago)

Integrating Apps with an SQL database

Hi All, I'm not sure whether I'm posting in the right place or whether this is a daft question or not, so please be gentle! As a purely hypothetical idea: My firm has a database containing training providers that can currently be searched by navigating to the website and searching using a postcode or by entering a course type and date when they would like to attend. What I would like is an app that 1) uses GPS location data to find courses in the locality; 2) allows the user to enter a location and date to search courses. The database is MySQL. Is there a way of writing an App that will integrate with the the MySQL database and narrow the results to the device's GPS location or a location manually entered by the user? Searching around the available plugins, I'm not sure this would be possible without coding it manually. Is that right and where would be a good place to start researching? Sorry if this makes me look very green, but I'm in that classic position where I've had a notion (which I admit may be a little ambitious) and don't know where to start!! Thanks for the help in advance. Alex
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/12/12 04:04 AM (13 years ago)
Hi Alex, Yes, tons of this stuff is done. In fact, lots of the plugins already pull data from a backend source to create dynamic menus and other neat things. Naturally there is a steep learning curve for all to this but 100% doable. Maybe try to get your head around how the dataURL property works on the Simple Menu plugin. Add some rows, refresh the screen, see the data? This could help you understand how the device communicates with a backend. You'll end up using merge fields to include the devices location in the URL so you can query you backend accordingly. Or, like you said, you could ask them to enter something, like in a search box then send that to your backend.
 
alexsamson
I hate code!
Profile
Posts: 8
Reg: Dec 04, 2012
Telford
2,030
like
12/12/12 04:45 AM (13 years ago)
Hi David, Thanks for the speedy response. It's good to hear that this might be achievable. I will certainly have a look at the dataURL property. I'm sure I'll be back in touch! Thanks again, Alex
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
12/12/12 07:06 AM (13 years ago)
Hey David @buzztouch, Do you have a tutorial on this or maybe a future webinar with Android? LA
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
12/12/12 08:15 AM (13 years ago)
@GoNorthwest wrote this up and it really is a GREAT tutorial that you should find interesting. http://www.buzztouch.com/resources/Posting_Current_Location_to_a_Database_v1.0.pdf Try to get this running and then you'll have yourself a starting point to work and learn from. @LA - this works for both iOS and Android
 
alexsamson
I hate code!
Profile
Posts: 8
Reg: Dec 04, 2012
Telford
2,030
like
12/12/12 08:24 AM (13 years ago)
Thanks Atrain53, that's a great place to start. Thanks to everybody for helping this terminal newbie! It's massively appreciated.
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
12/12/12 09:51 AM (13 years ago)
@ATRAIN53, Yes I did read that..ty.. LA
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
12/12/12 11:34 AM (13 years ago)
You may also want to read the complete example on how to connect android data with a PHP & MySQL databases on a server: http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/12/12 02:20 PM (13 years ago)
@LA: This would make a GREAT webinar. We may need to break it into a few parts because it's a complex topic but for sure it's a great idea. @Warren Evans has been handling all the webinar topics / schedules for us. Maybe shoot him a message to get this going. I'm 100% happy to lead this discussion and show some common approaches.
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
12/12/12 02:53 PM (13 years ago)
Ok will do and thank you David @buzztouch. LA
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
12/17/12 11:23 AM (13 years ago)
Please include these scenarios if time allows. Scenario #1: The dataset does not change often, thusly enabling viewing of the data in offline mode. Each time a data change is made, the data is automatically exported as a JSON file. On launch, the mobile app recognizes there is a revised JSON file for downloading. Scenario #2: The dataset changes frequently, it's important to be viewing the latest data, offline mode is not important. PHP code on the server renders mobile views or delivers JSON data streams. Mobile app shows a UIWebView or parses the JSON data into native views.
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
09/04/15 07:19 PM (10 years ago)
Hello, I just watched the Buzztouch webinar Integrating Apps with a SQL Database 12-20-12 I just wanted to find out if anyone still has the source code of the php files that were taught in this webinar. I would be extremely grateful to have it, if anyone still has it stored somewhere. thank you.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.