yes!
Exactly!
I add that the view query (bibliografie__autori), even deleting co-autore (not so necessary) gives, on phpmyadmin, an error (even working):
ALTER ALGORITHM = UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bibliografie__autori` AS select `bibliografia`.`bibliografie`.`autore` AS `autore`,`bibliografia`.`bibliografie`.`autore_nome` AS `autore_nome`,`bibliografia`.`bibliografie`.`id_autore` AS `id_autore` from `bibliografia`.`bibliografie` where `bibliografia`.`bibliografie`.`autore` not like '%AA.VV.%' group by `bibliografia`.`bibliografie`.`autore`,`bibliografia`.`bibliografie`.`autore_nome`
Warning in ./libraries/classes/DatabaseInterface.php#815
Undefined array key 1
Backtrace
CreateController.php#164: PhpMyAdmin\DatabaseInterface->getColumnMapFromSql(
string 'select `bibliografia`.`bibliografie`.`autore` AS `autore`,`bibliografia`.`bibliografie`.`autore_nome` AS `autore_nome`,`bibliografia`.`bibliografie`.`id_autore` AS `id_autore` from `bibliografia`.`bibliografie` where `bibliografia`.`bibliografie`.`autore` not like \'%AA.VV.%\' group by `bibliografia`.`bibliografie`.`autore`,`bibliografia`.`bibliografie`.`autore_nome`',
array,
)
Routing.php#191: PhpMyAdmin\Controllers\View\CreateController->__invoke(
,
array,
)
index.php#43: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/view/create',
,
,
)
as @DaveMaxwell guess
If I understand your words, @DaveMaxwell the only right solution would be to add author ids to every row of bibliografie
.
But adding ids to every book (because this is this what I should do, isn’t it?) would be a very long and “painful” work (I should add to every book the id of its author).
EDIT
Moreover I tried to modify the view (bibliografie__autori) in this way:
select `bibliografia`.`bibliografie`.`autore` AS `autore`,`bibliografia`.`bibliografie`.`autore_nome` AS `autore_nome`,`bibliografia`.`bibliografie`.`id_autore` AS `id_autore` from `bibliografia`.`bibliografie` where `bibliografia`.`bibliografie`.`autore` not like '%AA.VV.%'
group by `bibliografia`.`bibliografie`.`id_autore`
and in the php
SELECT a.autore, a.autore_nome, b.autore, b.autore_nome, a.id_autore, b.id_autore, b.imagelink, b.titolo, b.sigla as 'data SUBSTRING(data,1,4)', b.edizione, b.luogo, b.data, b.trad_titolo, b.trad_edizione, b.trad_luogo, b.trad_data, b.rivista, b.num, b.pagg, b.keywords, b.ambito, b.reperibilita, b.scheda
FROM bibliografie__autori a
INNER JOIN bibliografie b
WHERE a.id_autore = b.id_autore
ORDER BY a.autore, b.data
I have only books with author’s ids (as expected), but (not expected) I have two authors (Biffi Inos and Bifii Giacomo, with two different ids) still merged into one:
Under Biffi Inos there are books of Biffi Giacomo