I have a field which contains comments, this will always include either ON HIRE or OFF HIRE
How can I filter the fields based on if it includes OFF HIRE or not
Thanks![]()
I have a field which contains comments, this will always include either ON HIRE or OFF HIRE
How can I filter the fields based on if it includes OFF HIRE or not
Thanks![]()
Create a boolean field in your database table (aka bool, aka bit) - this value should then be 1 or 0, true or false.Originally Posted by s80wkr
In your code (ASP) you would simply use:
Code:If CBool(rsMyRecordset("HireStatus")) Then ' On Hire Else ' Off Hire End If
Warren Ashcroft
Red Fox UK Limited - Pioneers in Internet Technology
http://www.redfoxuk.com
w.ashcroft [at] redfoxuk.com
NOTE: Forum Private Messaging should not be used to contact staff with support queries.
You'd be better off doing the filtering when getting records from the database:
Note: You need to replace colX to be the names of the columns you want to get, tbl to be the name of the table. You may also need to change FALSE to 0 depending on the database platform.Code:SELECT col1, col2, HireStatus, col4 FROM tbl WHERE HireStatus = FALSE
I listed the columns this way because it provides better performance than using the wildcard '*' to select all columns.
I assumed that would go without saying, I just gave an example of how to do it in code, when you wish to show the hire status, but not filter the results by it.Originally Posted by Sol
Warren Ashcroft
Red Fox UK Limited - Pioneers in Internet Technology
http://www.redfoxuk.com
w.ashcroft [at] redfoxuk.com
NOTE: Forum Private Messaging should not be used to contact staff with support queries.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks