I have a mysql database with a dozen columns, two of which are 'outcome' and 'grade'. I need to write a php script which will query the outcome column for the word "written", count them, and then based on the count UPDATE a fixed percentage of the 'grade' column entries with a numeral 1 randomly. Any advice or examples of how to go about solving this problem would be greatly appreciated.
After reading the 'sticky' note at the head of this forum I feel the need to add that there will never be more than 800 records in this table.
Len