Re: [garyhoffmann] SQL to create a list selection based on another value in record
Hi Gary,
If you want to select all records with "state ='WI'" (assuming that the value is the same as the string selected and the state is stored in a field called 'state'), then you can add:
'where' => "state='WI'",
to the getRecords call (if you are using getRecords to retrieve the information) or, if you are hand coding the query, use:
$sql = "SELECT * FROM {$TABLE_PREFIX}your_table WHERE state='WI'";
Let me know if this helps,
Tom