Filtering rows of a MySQL Database

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
sms5138
Posts: 126
Joined: Mon Feb 23, 2015 11:49 pm

Filtering rows of a MySQL Database

Post by sms5138 » Mon Mar 30, 2015 8:32 pm

Hi,

I'm uncertain if this would fall under complete beginner or not, but any advice would be great! I have created a stack that can connect to a MySQL database, and add information to a specific table. One of the columns in the database has been made for the purpose of filtering (essentially a yes, or no column).

I'm trying to populate a field, or datagrid, with only the information related to one of those options (like i would only want to see the no's, and hide anything that is a yes).

I've read through the article on lessons section of runrev on connecting to a mysql database, and found them helpful.

I have also found some very helpful information on this forum, but am still looking for the best way to go about doing this.

Any help would be greatly appreciated.

Thanks in advance,

Sean

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Filtering rows of a MySQL Database

Post by Klaus » Mon Mar 30, 2015 9:12 pm

Hi Sean,


not sure I get it right, but sounds like an SQL problem :D

Maybe you mean something like this:
...
put "SELECT * from YOURTABLE WHERE 'yes_no_column' = 'yes'" into tSQL
## your LC database query here...
...
?

Best

Klaus

sms5138
Posts: 126
Joined: Mon Feb 23, 2015 11:49 pm

Re: Filtering rows of a MySQL Database

Post by sms5138 » Mon Mar 30, 2015 10:40 pm

Hi Klaus,

Thank you for the quick reply. That did help point me in the correct direction. Thank you again for your help!

-Sean

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Filtering rows of a MySQL Database

Post by Klaus » Tue Mar 31, 2015 12:17 pm

Hi Sean,

every time I have a project with SQL involved, I refresh my meager database knowledge here:
http://www.w3schools.com/sql/default.asp


Best

Klaus

sms5138
Posts: 126
Joined: Mon Feb 23, 2015 11:49 pm

Re: Filtering rows of a MySQL Database

Post by sms5138 » Wed Apr 01, 2015 1:25 am

Hi Klaus,

Thank you for the resource. I've already found some really helpful information.

-Sean

Post Reply