Issue 12: dbClient code does not match the actual Client table
Project Member Reported by bkmackellar, Mar 28, 2014
What steps will reproduce the problem?
1.make sure you have built the database
2.run forestdale from NetBeans
3. Login with any invalid id and password

You will see this message on the screen and in the error log
ERROR on select in retrieve_client Unknown column 'id' in 'where clause'

This is happening because the code in dbClient does not match the table
Here is the table

CREATE TABLE `dbClient` (
  `clientID`  text NOT NULL,
  `first_name` text NOT NULL,
  `last_name` text,
  `ssn` text,
  `gender` text,
  `birthday` text,
  `phone1` varchar(12) NOT NULL,
  `phone2` varchar(12) DEFAULT NULL,
  `status` text,
  `medication_taken` text,
  `admission_physical_notes` text,
  `discharge_physical_notes` text
  ) 
Here is the query
 $query = "SELECT * FROM dbClient WHERE id = '" . $clientID . "'";
You can see that the key in the client table is clientID, but in the query, you are using 'id'. Please fix it, and find all other mismatches in the column names and fix those too.
Mar 28, 2014
Project Member #1 bkmackellar
Note this can be replicated by running testDBClient.php. too