Hi

I your SQL   'i.itype'  "i"is not a table so I guess you need to use

"biblio.itype"

Not sure you need to also use  <<Item type|biblio.itemtypes>>

You might need to check database structure at
https://schema.koha-community.org/ for exact field table/column names

Regards

Alvaro
|----------------------------------------------------------------------------------------|
 Stay safe / Cuídate/  Reste sécurisé
*7* Switch off as you go / Apaga lo que no usas /  Débranchez au fur et à
mesure.
 *q *Recycle always / Recicla siempre / Recyclez toujours
 P Print only if absolutely necessary / Imprime solo si es necesario /
Imprimez seulement si nécessaire


Le ven. 20 mai 2022 à 01:57, Ma. Victoria H. Silva-Manuel <
mavicsi...@gmail.com> a écrit :

> Hi.
>
> I am using the SQL report below for our click tracker:
>
> SELECT count(*) AS 'No. of Times Clicked', biblio.title AS 'Title', URL
> > FROM linktracker
>
> JOIN biblio USING(biblionumber)
>
> WHERE date(timeclicked) BETWEEN <<Date BETWEEN (yyyy-mm-dd)|date>> AND
> > <<and (yyyy-mm-dd)|date>>
>
> GROUP BY url
>
>
> I want to add item type filter, so I tried to add it to WHERE clause:
>
> SELECT count(*) AS 'No. of Times Clicked', biblio.title AS 'Title', URL
> > FROM linktracker
> > JOIN biblio USING(biblionumber)
> > WHERE date(timeclicked) BETWEEN <<Date BETWEEN (yyyy-mm-dd)|date>> AND
> > <<and (yyyy-mm-dd)|date>> AND i.itype = <<Item type|itemtypes>>
> > GROUP BY url
>
>
> But I'm getting the following error:
>
> *The following error was encountered:*
> The database returned the following error:
> Unknown column 'i.itype' in 'where clause'
> Please check the log for further details.
>
> What am I doing wrong?
>
> --
> Ma. Victoria H. Silva-Manuel
> Registered Librarian, 3892
> _______________________________________________
>
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
_______________________________________________

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to