Met with JT and worked through all the issues, compiling a list of tasks, and figuring out the publisher's instructions more carefully. We sent a couple of questions to the publisher too. I'm in a position now to go ahead with the document editing.
Added a new page and a set of pictures to the Scholarships part of the site, on DR's instructions.
Three long days working with the TEI Council in Paris.
Taking 1 day of vacation at end of TEI Council meeting in Paris.
Attended a Deaf Studies meeting with HSD representatives.
Currently composing meeting minutes and will distribute accordingly upon completion.
Organizing, scheduling of upcoming Deaf Studies Meetings currently underway for 2012 and beyond.
SR has added something thatrequires curl, so add it to the build script.
Posting time spent on TEI tickets and discussions while travelling this weekend.
Leaving early to pack for trip to France for TEI Council meeting.
I had to find all instances of criminals in which both the given-name and surname fields are identical and the number of such duplicates
Here's the SQL I used for the example:
SELECT `surname`, `given_name`, COUNT(`surname`) AS Instances FROM criminals GROUP BY `surname`, `given_name` HAVING ( COUNT(`surname`) > 1 ) AND ( COUNT(`given_name`) > 1)
and here's the same SQL with abstracted table and field names:
SELECT `field1Name`, `field2Name`, COUNT(`field1Name`) AS Instances FROM tableName GROUP BY `field1Name`, `field2Name` HAVING ( COUNT(`field1Name`) > 1 ) AND ( COUNT(`field2Name`) > 1)
When I put a value into the given-names textfield in the search box and then tried to execute a search I got back an error message which began with the following:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.given' in 'where clause''
It took a couple of hours wading through the form, and the json and zend code working with the form and the data model until I found this line of code in includes/classes/Search.php
protected function _prepareCriminals() {
$this->_select->joinLeft(
array('c' => 'criminals'),
'c.criminal_id = tf.criminal_id_fk',
array('c.criminal_id', 'c.surname', 'c.given_name', 'c.age')
);
...
if ($this->inData('given-name')) {
$this->_select->where('LOWER(c.given-name) LIKE ?', '%' . strtolower($this->_data['given-name']) . '%');
}
I changed one "given-name" to a "given_name" (see below) and the queries now seem to work:
protected function _prepareCriminals() {
$this->_select->joinLeft(
array('c' => 'criminals'),
'c.criminal_id = tf.criminal_id_fk',
array('c.criminal_id', 'c.surname', 'c.given_name', 'c.age')
);
if ($this->inData('given-name')) {
$this->_select->where('LOWER(c.given_name) LIKE ?', '%' . strtolower($this->_data['given-name']) . '%');
}
so, apparently because given-name was not a member of the c array, the instance of LOWER(c.given-name) was interpreted as LOWER(c.given)-name. name of course was null so presumably had no effect, resulting in c.given being the name of the field in the table to search, which of course doesn't exist generating the error I saw.