URGENT 'WHERE' with lists

3 posts by 2 authors in: Forums > CMS Builder
Last Post: January 2, 2009   (RSS)

Happy New Year to all!

I have used the WHERE clause successfully in the past but I just got stumped trying to use it with a list.

I.E. I have a gender field with two checkboxes "Male" and "Female". So now I want to display records for males only and so I used 'where' => 'gender="Male"', but it displays nothing.

When I generate the code for a full listing it displays that particular field as:

<?php echo join(', ', getListLabels('seeds_and_qualifiers', 'gender', $record['gender'])); ?>

Oddly enough when I do a search directly in the MYSQL database, I am getting nothing either.

Any ideas?

This is fairly urgent because I need to get this page up by tomorrow morning.

Thanks
Terry

Re: [Dave] URGENT 'WHERE' with lists

Hi Dave,

I've switched as recommended and it works.

I omitted to say that it was both checkboxes and radio buttons that the WHERE clause was not working.

Terry