Discussion Forums  >  Suggestions, Ideas, Wish List

Replies: 2    Views: 144

SGB
Android Fan
Profile
Posts: 56
Reg: Mar 26, 2013
Goes
1,160
07/12/14 02:09 AM (10 years ago)

Connect to database

Hi there. I've made some websites for elementary schools and they all work with a CMS (PHP and MySQL). Now it's time to make an app and retrieve some values from the database like phone number, emailaddress, etc. (simple things) I would like to make only one app that can be used by the different schools. Since the schools all use the same CMS and all data is stored in the same place, only the domainname is different. I don't think there is a Plugin that I could use, so maybe I have to make the app from scratch. What I really would like to have (or need) is a way to save a string to the device so when it starts the right info is retreived from the database. Lets say I have school1.com and school2.com When the app starts for the first time it must ask for a string (the domainname) and this must be saved on the device. When you start the app again, it must connect to the right database using the string that is saved in the device. Off course there also must be a way to change the string if needed. I would really hear your comments on how to proceed. Thanks, Edwin.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/12/14 03:59 AM (10 years ago)
I'm a fan of WB Add Ons for BT. They're template scripts connected to a custom table in your BT database. It shouldn't be too hard to either create a table for your BT Database, or use an existing CMS table (or more) from your existing CMS to power a BT app by utilizing the dataURL. http://www.buzztouch.com/forum/thread.php?tid=DD7AB5D535F2631073ED32C&currentPage=5 I would still create a different app for each school... just Use Chris1's app copier to duplicate it as need be. This would allow a bit more customization if needed, and as long as it's not 100 schools, the maintenance would be pretty managable, since you're really pulling from the same database for most of the content. Just one of many ways to do it. Cheers! -- Smug
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/12/14 06:25 AM (10 years ago)
I've been playing with this idea for my church apps. Been months since I worked on it so I need to get back to it. But I had the basic idea working pretty easily. Here's what I did: Used the QR Scan plugin as the home screen. Scanning a code sends it to my server for validation. If valid, it returns a dataURL related to that code (ie for that church). App then does a refresh using that dataURL, and returns essentially a whole new app, customized to its needs. Requirements: 1) modify QR Scan plugin to send results to a URL (easy) 2) create a method to refresh the app with an alternative dataURL (medium) Another approach might be to use my Easy Forms plugin to collect a single piece of data and send it to your server (already possible with plugin) and save the result onto the device (easy). Then modify particular plugins to collect this data off the device (easy) and then do something with it (easy to hard depending on the 'what'). And of course, if you need a customized plugin, help is just a click away: https://buzz-tools.com
 

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.