Forums

Static Filter on ChronoConnect

mkusens 08 Mar, 2011
Hi Bob - I am trying to apply a static filter to a CC form and followed the instructions on the forum and on the static filter tutorial. However, when I include the WHERE statement below, no results display. When the WHERE statement is removed, all records show.
WHERE 'Attorney_Screener' = 'Ariel Furst'


The database field is called 'Attorney_Screener' and the value saved in the field that I am trying to filter is a persons name such as "Ariel Furst" or "Daniel Grissom". The values are put into the database table via ChronoForms from a drop down list. Please let me know what I am doing wrong here. I'll owe you another beer (or 2) for helping me on this one. The rest of the code from my CC form is below:

ORDER FIELDS:
'Date_of_Incident' DESC


HEADER:
<table>
   <thead>
       <tr>
          <th style='width:70px;'>DATE OF INCIDENT</th>
          <th style='width:80px;'>FIRST NAME</th>
          <th style='width:80px;'>LAST NAME</th>
          <th style='width:100px;'>HOME PHONE NUMBER</th>
          <th style='width:100px;'>CELL PHONE NUMBER</th>
          <th style='width:100px;'>ATTORNEY</th>
          <th style='width:250px;'>CASE DESCRIPTION</th>
      </tr>
   </thead>


BODY:
<tr><td>{Date_of_Incident}</td><td>{First_Name}</td><td>{Last_Name}</td><td>{Home_Phone_Number}</td><td>{Cell_Phone_Number}</td><td>{Attorney_Screener}</td><td>{Case_Description}</td><td>{edit_record}</td></tr>



FOOTER:
</table>
{pagination}
GreyHead 09 Mar, 2011
Hi mkusens,

Please try
WHERE `Attorney_Screener` = 'Ariel Furst'
with back-ticks ` ` round the column name (straight quotes indicate a text string to MySQL).

Bob
mkusens 09 Mar, 2011
Worked like a charm. You have another beer headed you way. Thanks.
This topic is locked and no more replies can be posted.