[thelist] SQL query and filtering output with PHP

Anthony Baratta Anthony at Baratta.com
Mon Jun 4 19:48:07 CDT 2001


At 05:20 PM 6/4/2001, you wrote:
>I guess because I was trying to execute only one query...since that's all
>that was necessary to get everything...I did it the way you suggested, it
>works...but its kind of ugly, lots of repeating code (with just one variable
>changed per instance).
>
>So now, I have 3 queries...one for each category of work...

OK...

We'll you could do it this way...psuedo-code alert

select * from paintings group by category

open RecordSet
         if Category = "Oil" { do this}
         if Category = "WaterColor" { do this}
         if Category = "Crayon" { do this}
         if Category = "Chalk" { do this}

         next record
close RecordSet
----
Anthony Baratta
President
Keyboard Jockeys





More information about the thelist mailing list