3 Replies Latest reply on Apr 18, 2010 9:02 AM by ramell2

    Filter Data

    ramell2

      Im connected to my mySQL DB using DCD. I can get all the info to display in a datagrid.  But how I filter data  for example just show only the products that are Red.

        • 1. Re: Filter Data
          SpaghettiCoder Level 3

          What's DCD?

           

          To filter data that are red, just create a filter function.

          • 2. Re: Filter Data
            David_F57 Level 5

            hi,

             

            @spaghetticoder - DCD is basically the data service wizards. its data centric design or something like that - not 100% sure and don't really care because over time all these initial definitions get adjusted to suit buzz words, next year we can call it design controlled data services.

             

             

            As far as filtering is concerned you have 2 choices, apply filters to the received data as mentioned, or extend your backend services to return the required data set i.e if you are using php you would pass 'red' as a a parameter to your php service call so then the  sql is 'select * from products where prodcolor=$passedcolor', local filtering is fine for a small amount of information, but if this is a common application requirement or a lot of data it makes more sense to return exactly what you want(in mysql DB's I actually create views for commonly used filters).

             

            David.

            • 3. Re: Filter Data
              ramell2 Level 1

              Thanks David.