To simplify query-writing, I've replaced all instances of NULL with 0 in the following fields documents.doc_loc_id
documents.doc_credit_id
documents.doc_archive_id
documents.doc_coll_id
I've added a record to each of these tables with the id of 0 and text values of [none]
locations
credits
archives
collections
I now get the correct number of records back from my searches.
In testing the Siberia site, I got strange results (see details below). The cause is a bug in that specific version of mysql involving compound WHERE or JOIN clauses which involve equality tests across two or more tables. Greg is working with the sysadmins to update the mysql engine running on our server, as newer versions of mysql have debugged this problem. Strange that nobody else has encountered it as we have at least a dozen databases running on that engine.
SELECT documents.doc_id, archives.archive_en
FROM documents,archives
WHERE documents.doc_archive_id = archives.archive_id
--> 2261 records (seems right)
SELECT documents.doc_id, archives.archive_en, collections.coll_en
FROM documents
JOIN archives ON (documents.doc_archive_id = archives.archive_id)
WHERE 1
--> returns 2261 records (seems right)
SELECT documents.doc_id, archives.archive_en, collections.coll_en
FROM documents,archives,collections
WHERE documents.doc_archive_id = archives.archive_id
AND documents.doc_coll_id = collections.coll_id
--> returns 1296 records (seems wrong, should be 2261)
SELECT documents.doc_id, archives.archive_en, collections.coll_en
FROM documents
JOIN archives ON (documents.doc_archive_id = archives.archive_id)
JOIN collections ON (documents.doc_coll_id = collections.coll_id)
WHERE 1
--> returns 1296 records (seems wrong, should be 2261)
Not entirely clear what the pattern of the problem is:
SELECT documents.doc_id, archives.archive_en
FROM documents,archives
WHERE documents.doc_archive_id = archives.archive_id
AND archives.archive_id = 4
--> returns 2 records (seems right - consistent with test above)
SELECT documents.doc_id, archives.archive_en
FROM documents,archives
JOIN archives ON (documents.doc_archive_id = archives.archive_id)
WHERE archives.archive_id = 4
-- returns 2 records (seems right - consistent with test above)
SELECT documents.doc_id, archives.archive_en, collections.coll_en
FROM documents,archives,collections
WHERE documents.doc_archive_id = archives.archive_id
AND documents.doc_coll_id = collections.coll_id
AND archives.archive_id = 4
--> returns 2 records (seems right - NOT consistent with test above)
SELECT documents.doc_id, archives.archive_en, collections.coll_en
FROM documents
JOIN archives ON (documents.doc_archive_id = archives.archive_id)
JOIN collections ON (documents.doc_coll_id = collections.coll_id)
WHERE archives.archive_id = 4
--> returns 2 records (seems right - NOT consistent with test above)
BS's drupal prefers to work with 'clean URLs', which means that individual pages of the site can be accessed without the ?q= in in the URL path. Setting the site to work with clean URLs is something that you can normally turn on and off with a Drupal installation, but at the moment, it doesn't seem to work with the UVic server. In reading up on it, it seems that this feature requires that mod_rewrite be enabled in Apache.
I did a couple of simple tests and it appears that mod_rewrite is not enabled. This is up to the sysadmins. I wrote to helpdesk, who will escalate and I'll find out what their policy is on allowing mod_rewrite on an account, domain name etc.
LL copied and pasted some text for a web page from MSWord into Notepad++. This appears to have caused Notepad++ to treat the character encoding as 8859-1 rather than UTF. When the page was opened in the browser, the accented characters were not UTF characters, so showed up as unknown character boxes. By setting the character encoding in the browser to 8859-1, the correct characters showed up. To recover the corrupted character and change the character encoding to UTF-8 in Notepad++:
- open the file in Notepad++
- in the Encoding menu, chose Encode in ANSI
- in the Encoding menu, chose Convert to UTF-8 without BOM
- save file
The upcoming legal bibliography project is coming up for submission to the committee, and so far we have a very sparse set of details about what's required; there's a jumble of suggested technologies and no clear path for integrating them. In the ongoing absence of detail, we looked this morning at one aspect of the project that we can consider: finding out whether an item has been submitted previously or not, based on fuzzy matching. We looked at the possibility of using NCD for this, and it seems practical in PHP, which has lots of useful compression algorithms; we looked in vain for a decent working implementation of any compression algorithm in JavaScript, so it doesn't seem that it would be practical to do this in JS. However, we also note that Zotero already has duplicated detection working "internally", and it will presumably be available soon, so perhaps this is not a good use of our time.
It seems to me that the entire functionality that's required could be implemented with a collective centralized Zotero bibliography -- one closed group and one open group project, so anyone could submit to the open group, and managers could then move data to the closed group.