CompanyHistory

From Sega Retro

Clock.svg
This task is unfinished
This is a wiki task that requires more thought or peer review. An important issue that needs to be solved, which will appear at the top of Sega Retro:Todo until this message is removed.

The join/group by is incorrect, which is why the dates are wrong.

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT `cargo__releases`.`name` AS `name`,`cargo__releases`.`date` AS `date`,`cargo__companies`.`company` AS `company`,`cargo__companies`.`format` AS `format`,`cargo__releases`.`console` AS `console`,`cargo__companies`.`role` AS `role`,`cargo__companies`.`credited` AS `credited` FROM `cargo__companies` LEFT OUTER JOIN `cargo__releases` ON ((`cargo__companies`.`name`=`cargo__releases`.`name`)) WHERE `cargo__companies`.`format`="PlayStation 3" AND `cargo__companies`.`company`="Sega AM2" GROUP BY `cargo__releases`.`name` ORDER BY `cargo__releases`.`date`,`cargo__releases`.`name` LIMIT 100 Function: CargoSQLQuery::run Error: 1021 Disk full (/tmp/#sql-temptable-15e6a-2501bd2-334e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") (localhost)

This could be solved if I could join "PS3" onto "PlayStation 3". I don't know how to do that without making another table (to replicate template:Code2Format). Is there another way?

-Black Squirrel (talk) 11:39, 5 January 2020 (EST)

So the problem is that "companies" uses the full console names and "releases" uses codes? I don't really understand the cargo syntax you've used here, so all I can suggest is creating an additional template that fetches the date, instead of trying to get the date in CompanyHistory. The template would be called from Template:CompanyHistory/Cargo and would need to contain a reverse Template:Code2Format. - Hivebrain (talk) 15:02, 5 January 2020 (EST)
Alright no worries - I thought there might have been a shortcut.
I've cheated and made Special:CargoTables/codeformat, which means we can join the tables in a better way. I think the results are correct now - missing games are hopefully the fault of individual pages. -Black Squirrel (talk) 16:07, 5 January 2020 (EST)

Note to self

template isn't pulling out games that have ampersands or single quotes in their names. SQL thing maybe. Will check at some point -Black Squirrel (talk) 16:26, 8 January 2020 (EST)