Page 1 of 1

Filtering rows of a MySQL Database

Posted: Mon Mar 30, 2015 8:32 pm
by sms5138
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

Re: Filtering rows of a MySQL Database

Posted: Mon Mar 30, 2015 9:12 pm
by Klaus
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

Re: Filtering rows of a MySQL Database

Posted: Mon Mar 30, 2015 10:40 pm
by sms5138
Hi Klaus,

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

-Sean

Re: Filtering rows of a MySQL Database

Posted: Tue Mar 31, 2015 12:17 pm
by Klaus
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

Re: Filtering rows of a MySQL Database

Posted: Wed Apr 01, 2015 1:25 am
by sms5138
Hi Klaus,

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

-Sean