Page 1 of 1

Basic Lesson for Putting Database on Line

Posted: Wed Jun 05, 2013 11:08 pm
by trailboss
I've made a flat, simple database for birds and have begun to make web pages for each day of birding. However, there are hundreds of trips. Thus, making a webpage for each trip is getting too time consuming even though I use runrev to create webpages.

There are only five items in the comma delimited database. (I just store those data in a field and manipulate them with runrev.)
BIRDNAME,DATE,PLACE,NOTES,JOURNAL

I have scanned the hand written journal notes for each day too and they're part of each web page.

So my question is: Where is the best and dumbest and easiest lesson to teach me to display these records on line from a database using runrev?

Thanks,

Tom

Re: Basic Lesson for Putting Database on Line

Posted: Thu Jun 06, 2013 12:47 am
by FourthWorld
Do any of the journal entries contain commas?

I'm a big fan of tab-delimited data, but either way, with a data set so small if you only want to display them you may not need a database, just use chunk expressions to parse the data you want and put it into an HTML template.

Re: Basic Lesson for Putting Database on Line

Posted: Thu Jun 06, 2013 4:16 am
by dave_probertGA6e24
In another post someone asked about how to use a remote database (i.e. online at a server) and I wrote a (relatively) simple tutorial guide thing to try and help.

It might be useful for you too.

Here

Though it might be overkill for your needs it could still be something useful to learn if you want to advance your project in some way.

Cheers,
Dave

Re: Basic Lesson for Putting Database on Line

Posted: Fri Jun 07, 2013 3:52 pm
by trailboss
Yes, I have to admit that the journal part of the database is actually separate and tab delimited for that reason. I need my commas. Bird comments can't have any commas and my little program won't allow them in the comma-delimited part as it would ruin everything.

But I'm not sure what you mean when you say to "just use chunk expressions to parse the data you want and put it into an html template." Sounds good, though because I guess there is some way to have a template full of data and you can draw from it? My html is quite basic.

Tom

Re: Basic Lesson for Putting Database on Line

Posted: Fri Jun 07, 2013 4:27 pm
by FourthWorld
"Chunk expressions" is just a shorthand term for the parsing operators xTalks are famous for, things like "item 2 of line 4".

Check out the merge function in the dictionary for ideas on how you can include function calls in HTML templates for quick page generation.

For more specific advice, it would be helpful to better understand your goals. Are you doing this as an exercise to learn LiveCode server and/or databases, or simply want to get the pages online?

If the latter, if you'll pardon the plug my WebMerge product makes short work of generating static web pages from nearly any delimited source. The trial is free, and if it does what you need drop me an email and I'll send you a link for a steeply discounted price (always happy to make my stuff available to members of the LC community for cheap).

But since your needs are relatively modest (some of our WebMerge customers make surprisingly complex sites with it), you could craft your own one-off solution without much difficulty, and it would be a good learning experience.

Are you using LiveCode Server?

Re: Basic Lesson for Putting Database on Line

Posted: Mon Jun 10, 2013 2:42 pm
by trailboss
The online database stuff looks like a bit of work for me. I think I'll stick to the way I'm doing it. I've already created my own custom web page maker for my data. It makes static pages from my database with links to images and things so the web pages are nice. Rinky dink, but it works!