Question about a simple user databse
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Question about a simple user databse
So, I am designing an app in livecode that allows online poker players to keep notes on each other. One of the features I am trying to include is a "public notes" option.
Basically I need 2 columns one for player name, and one for the comments that have been left. the app needs to be able to retrieve and edit the data. Would it be possible to use a google drive spreadsheet for this? I had tried to use an ftp server and .txt files as a simple way to do this, but it seems that would not work with many users trying to add comments simultaneously . I would appreciate any help or hints you guys might have.
Thanks in Advance,
Treefolk
Basically I need 2 columns one for player name, and one for the comments that have been left. the app needs to be able to retrieve and edit the data. Would it be possible to use a google drive spreadsheet for this? I had tried to use an ftp server and .txt files as a simple way to do this, but it seems that would not work with many users trying to add comments simultaneously . I would appreciate any help or hints you guys might have.
Thanks in Advance,
Treefolk
-
- Livecode Opensource Backer
- Posts: 328
- Joined: Mon Dec 05, 2011 5:34 pm
- Contact:
Re: Question about a simple user databse
Hi Treefolk,
I can't answer the part about using Google Spreadsheets, but I can recommend using a server-side database such as MySQL or even SQLite - with a PHP, ASP or whatever server-side language you are happy with, wrapper.
There are many, many examples of PHP scripts to access MySQL/SQLite Databases and you don't need to have a fancy Web front-end to go with it. A basic request receiver page that handles the incoming URL request and prints out the results should be adequate. In LC you then simply make a piece of code similar to this:
doing it this way means that you have a flexible database backend which you can enhance to suit whatever your program wants to do in the future. But even more so you have a framework process to allow other apps to use your remote databases.
Learning the PHP or whatever server-side language is not that difficult really when you focus on only that aspect you really need (you don't need to worry about fancy HTML stuff).
If you want more detail then let me know - I'm sure I can point you towards some good PHP tutorials or even knock together an example script (Hmm, maybe I should do a tutorial myself on the subject!).
PS. Forgot to mention that this would allow many, many people to add/view/edit at the same time.
Cheers,
Dave
I can't answer the part about using Google Spreadsheets, but I can recommend using a server-side database such as MySQL or even SQLite - with a PHP, ASP or whatever server-side language you are happy with, wrapper.
There are many, many examples of PHP scripts to access MySQL/SQLite Databases and you don't need to have a fancy Web front-end to go with it. A basic request receiver page that handles the incoming URL request and prints out the results should be adequate. In LC you then simply make a piece of code similar to this:
Code: Select all
put URL ("http://yourwebserver.com/yourfilename.php?dothis=getdata&user=1234") into myres
split myres by return and tab
put myres[1][2] into field "whatever"
put myres[1][3] into field "otherstuff"
Learning the PHP or whatever server-side language is not that difficult really when you focus on only that aspect you really need (you don't need to worry about fancy HTML stuff).
If you want more detail then let me know - I'm sure I can point you towards some good PHP tutorials or even knock together an example script (Hmm, maybe I should do a tutorial myself on the subject!).
PS. Forgot to mention that this would allow many, many people to add/view/edit at the same time.
Cheers,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.
Visit http://electronic-apps.info for released App information.
Re: Question about a simple user databse
Hi Dave,
Simon
I'd read it!!! N' stuff.Hmm, maybe I should do a tutorial myself on the subject!
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Livecode Opensource Backer
- Posts: 328
- Joined: Mon Dec 05, 2011 5:34 pm
- Contact:
Re: Question about a simple user databse
Ok, Simon, you persuaded me 
I've started work on it - it'll be ready in a couple of days.
Cheers,
Dave

I've started work on it - it'll be ready in a couple of days.
Cheers,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.
Visit http://electronic-apps.info for released App information.
Re: Question about a simple user databse
Thank you for the replies! I should point out that I consider myself a hobbyist at best, so any tutorial you could link to would be great. I have checked out a few web services such as microsoft azure and caspio bridge, but I am pretty lost, I do not know anything about php, or sql in general for that matter, so forgive me if what I am asking is very simple. Would it be possible to have a stack hosted online that users could open end edit simultaneously?
Re: Question about a simple user databse
Goooo Dave! 
Simon

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Livecode Opensource Backer
- Posts: 328
- Joined: Mon Dec 05, 2011 5:34 pm
- Contact:
Re: Question about a simple user databse
Hi,
Took me a couple of days longer than I expected and might not be quite correct yet, but here is my first Tutorial for Livecode.
Livecode and Remote Database access via Server-Side Scripting (for beginners!)
It can be found here: http://www.vampire-tiger.info/livecode- ... bases.html
and if you see any problems or don't follow something I've put there, then please let me know either here or via email (at the top of the tutorial page).
Apologies in advance for the layout and colour coding - but it seems that some things go a little weird in CSS. I'll take another look at that in a couple of days.
Cheers for now,
Dave
Took me a couple of days longer than I expected and might not be quite correct yet, but here is my first Tutorial for Livecode.
Livecode and Remote Database access via Server-Side Scripting (for beginners!)
It can be found here: http://www.vampire-tiger.info/livecode- ... bases.html
and if you see any problems or don't follow something I've put there, then please let me know either here or via email (at the top of the tutorial page).
Apologies in advance for the layout and colour coding - but it seems that some things go a little weird in CSS. I'll take another look at that in a couple of days.
Cheers for now,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.
Visit http://electronic-apps.info for released App information.
Re: Question about a simple user databse
Hi Dave,
wonderful, thank you very much!
Best
Klaus
wonderful, thank you very much!
Best
Klaus
Re: Question about a simple user databse
Super Dave!
Lots more fun to be had!
Simon
Lots more fun to be had!
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Question about a simple user databse
I like it, first time it's clear for me. Thanks Dave.
Marek
Marek
Re: Question about a simple user databse
Thanks so much for the tutorial. I now understand quite a bit more about it. It is much appreciated.