Displaying one field of a database record

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
StevenK
Posts: 7
Joined: Sun Apr 14, 2013 4:10 pm

Displaying one field of a database record

Post by StevenK » Tue Apr 16, 2013 3:23 am

I am very much a beginner and am just having difficulty conceptualizing how to display one field from a database record on one card, and then the next field on another card. I understand how to connect to a database and display a full record from a table, but I don't know how to just display one field from the record. I am working on a flashcard application and want the user to be able to navigate through a table that contains two columns: in each record the first column contains the "question" (the front of the flashcard) and the second column contains the "answer" (the back of the card). So I would like to display the front of the flashcard, and have the user click to flip to the back of the flashcard. I would also like the user to be able to just move to the next card rather than display the back of the card. If someone can just get me pointed in the right direction of how I would isolate one field in a record and display it on one card, I'd appreciate it. Thanks!

StevenK
Posts: 7
Joined: Sun Apr 14, 2013 4:10 pm

Re: Displaying one field of a database record

Post by StevenK » Thu Apr 18, 2013 1:40 pm

Ok ... well I guess that musy not be possinle then. I'll have to learn a different language.

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Displaying one field of a database record

Post by Dixie » Thu Apr 18, 2013 1:47 pm

When you query the database you will end up with two columns ?.. Yes ?... Ok, then put the result of the database query into a variable, or a hidden field.. the results will be tab-delimited.. so,

item 1 of line 1 of yourVariable will contain your first question and item 2 of line 1 of yourVariable the answer... You can then place item 1 of line 1 into the field that will display the question and item 2 into the field of another card that will show the answer..

Dixie

StevenK
Posts: 7
Joined: Sun Apr 14, 2013 4:10 pm

Re: Displaying one field of a database record

Post by StevenK » Thu Apr 18, 2013 3:21 pm

Thanks Dixie ... that makes sense. I'll give it a try.

Post Reply