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 2011-02-21 17:54:05

vongillus
Member
Registered: 2009-12-03
Posts: 6

Recherche globale 0.78.2 et erreur SQL lorsque ">"

Bonjour

GLPI 0.78.2 (mise à jour depuis 0.72.4)
Plugins (File injection, Network architecture, Print to PDF, Reports, Web services)
php 5.2.10
mysql 5.0.77
apache 2.2.3
installé sur CentOS 5.1

Lorsque je lance une recherche globale sur une chaine avec un ">", j'ai parfois l'erreur suivante :

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR ( `glpi_computers_devicenetworkcards`.`specificity` LIKE '%test > 123%'' at line 7

La requete qui ne passe pas :

SELECT `glpi_computers`.`name` AS ITEM_0,                        `glpi_computers`.`id` AS ITEM_0_2, `glpi_locations`.`completename` AS ITEM_1,  GROUP_CONCAT(DISTINCT `glpi_netpoints`.`name` SEPARATOR '$$$$') AS ITEM_2,  GROUP_CONCAT(DISTINCT `glpi_networkports`.`ip` SEPARATOR '$$$$') AS ITEM_3,  GROUP_CONCAT(DISTINCT `glpi_networkports`.`mac` SEPARATOR '$$$$')
                        AS ITEM_4, GROUP_CONCAT(DISTINCT `glpi_computers_devicenetworkcards`.`specificity`
                                    SEPARATOR '$$$$') AS ITEM_4_2, `glpi_computers`.`id` AS id  FROM `glpi_computers` LEFT JOIN `glpi_locations`  ON (`glpi_computers`.`locations_id` = `glpi_locations`.`id`)  LEFT JOIN `glpi_computers_devicenetworkcards` ON (`glpi_computers`.`id` = `glpi_computers_devicenetworkcards`.`computers_id`) 
                   LEFT JOIN `glpi_networkports`  ON (`glpi_computers`.`id` = `glpi_networkports`.`items_id`
                                                  AND `glpi_networkports`.`itemtype` = 'Computer') 
                   LEFT JOIN `glpi_netpoints`  ON (`glpi_networkports`.`netpoints_id` = `glpi_netpoints`.`id`)  WHERE  `glpi_computers`.`is_deleted` = '0'  AND `glpi_computers`.`is_template` = '0'  AND (  (    `glpi_computers`.`name`  LIKE '%test > 123%'    OR  `glpi_locations`.`completename`  LIKE '%test > 123%'    OR  `glpi_netpoints`.`name`  LIKE '%test > 123%'   OR  (INET_ATON(`glpi_networkports`.`ip`) > )  OR  (  `glpi_computers_devicenetworkcards`.`specificity`  LIKE '%test > 123%'   OR `glpi_networkports`.`mac`  LIKE '%test > 123%'  ) )  ) GROUP BY `glpi_computers`.`id` ORDER BY ITEM_0 ASC

Il semble que l'erreur ne se produise que quand j'ai un chiffre après le ">".

Merci!

Gilles

Offline

#2 2011-02-22 11:16:50

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Recherche globale 0.78.2 et erreur SQL lorsque ">"

corrigé.


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

Board footer

Powered by FluxBB