You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2022-09-15 08:58:26

WebGreg
Member
Registered: 2020-02-27
Posts: 740

PHP User Warning (512): getFromDBByCrit expects to get one result

Hi

In the php-errors.log I get:

PHP User Warning (512): getFromDBByCrit expects to get one result, 8 found in query "SELECT `id` FROM `glpi_networkports_networkports` WHERE (`glpi_networkports_networkports`.`networkports_id_1` = '106677' OR `glpi_networkports_networkports`.`networkports_id_2` = '106677')"

38f55b5f02c6f.jpg

Any advice what can I do witch it? I don't know if deleting it directly from the database is a good idea. There are connections - more errors may appear.


I also have other similar ones:


PHP User Warning (512): getFromDBByCrit expects to get one result, 2 found in query "SELECT `id` FROM `glpi_computers_items` WHERE `itemtype` = 'Monitor' AND `items_id` = '288'"

PHP User Warning (512): getFromDBByCrit expects to get one result, 2 found in query "SELECT `id` FROM `glpi_ipaddresses` WHERE `mainitems_id` = '536' AND `mainitemtype` = 'Printer' AND `is_dynamic` = '1' AND `name` = 'x.x.x.x'"


--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS

Offline

#2 2022-09-15 09:24:17

WebGreg
Member
Registered: 2020-02-27
Posts: 740

Re: PHP User Warning (512): getFromDBByCrit expects to get one result

I opened any port in GLPI > changed the ID in the address to the one from the error message > identified the switch to which the port belongs > deleted the device > re-inventorying > I hope it will be good.

The next messages cause more trouble.

1. PHP User Warning (512): getFromDBByCrit expects to get one result, 2 found in query "SELECT `id` FROM `glpi_ipaddresses` WHERE `mainitems_id` = '536' AND `mainitemtype` = 'Printer' AND `is_dynamic` = '1' AND `name` = 'x.x.x.x'"

00a8ea638dbcf.jpg

Why am I getting an error with 2 found when this query returns 1 result?


2. PHP User Warning (512): getFromDBByCrit expects to get one result, 2 found in query "SELECT `id` FROM `glpi_computers_items` WHERE `itemtype` = 'Monitor' AND `items_id` = '288'"

0b308313d0034.jpg

When I check computers with these IDs, there is only one monitor with the ID 288

338e5c11119be.jpg

edb91eef71b9a.jpg


--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS

Offline

Board footer

Powered by FluxBB