Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

2.4.1 recherche ne fonctionne plus

Bonjour, 

Suite à la mise à jour 2.4.1 je rencontre quelques soucis, notamment, la recherche ne fonctionne plus dans la visu_computer.

après quelques recherches, la cause du problème est que  la requète semble mal former les champs fields_ dans la clause WHERE (il manque le underscore) : 

SELECT 

SQL_CALC_FOUND_ROWS

a.fields_12, 

a.TAG, 

a.fields_9, 

a.fields_5, 

a.fields_8, 

h.lastdate, 

h.name, 

h.ID, 

h.userid, 

h.osname, 

h.memory, 

h.processors, 

h.workgroup, 

h.osversion, 

h.oscomments, 

h.processort, 

h.processorn, 

h.swap, 

h.lastcome, 

h.quality, 

h.fidelity, 

h.description, 

h.wincompany, 

h.winowner, 

h.useragent, 

e.smanufacturer, 

e.bmanufacturer, 

e.ssn, 

e.smodel, 

e.bversion, 

h.ipaddr, 

h.userdomain, 

h.ARCH, 

e.bdate, 

v.name as vname, 

n.macaddr, 

n.ipmask, 

n.ipgateway, 

n.ipsubnet  

from hardware h 

LEFT JOIN accountinfo a ON a.hardware_id=h.id   

LEFT JOIN networks n ON n.hardware_id=h.id  AND h.IPADDR=n.IPADDRESS 

LEFT JOIN bios e ON e.hardware_id=h.id 

LEFT JOIN videos v ON v.hardware_id=h.id  

WHERE (

( a.fields9 LIKE '%MARECHERCHE%' )  

OR  ( a.fields5 LIKE '%MARECHERCHE%' )  

OR  ( a.fields8 LIKE '%MARECHERCHE%' )  

OR  ( h.lastdate LIKE '%MARECHERCHE%' ) 

OR  ( h.name LIKE '%MARECHERCHE%' )  

OR  ( h.userid LIKE '%MARECHERCHE%' )  

OR  ( h.osname LIKE '%MARECHERCHE%' )  

OR  ( h.useragent LIKE '%MARECHERCHE%' )  

OR  ( e.ssn LIKE '%MARECHERCHE%' )  

OR  ( e.smodel LIKE '%MARECHERCHE%' )  

OR  ( h.ipaddr LIKE '%MARECHERCHE%' ) 

OR  ( n.macaddr LIKE '%MARECHERCHE%' ) ) 

 AND  deviceid<>'_SYSTEMGROUP_' AND deviceid<>'_DOWNLOADGROUP_'  

Dans le WHERE les champs de la table accountinfo nommés fields sont nommés fields_ or dans la requète le _ ne figure pas.

Est-ce que quelqu'un saurait me dire ou je peux trouver la page responsable et si le problème vient de la mise à joru qui ne se serait pas bien passé chez moi ou simplement problème dans la mise à jour ?

même genre de problème sur la page d'activation des paquets de télédéploiement : 

 CAST(from_unixtime(FILEID) AS DATETIME(0))

 plante la requète, j'ai donc pour le moment modifié dans : 

/usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_teledeploy/ms_tele_activate.php

  $l->g(593) => 'CAST(from_unixtime(FILEID) AS DATETIME(0))',

par

  $l->g(593) => 'from_unixtime(FILEID)',

Merci pour vos réponses

in OCS Inventory NG server for Unix by (370 points)

2 Answers

0 votes
Bonjour,

Merci d'ouvrir un issue à https://github.com/OCSInventory-NG/OCSInventory-ocsreports/issues/new

Cordialement

Frank
by (88.5k points)
0 votes

#397 opened 

avec mon anglais hum....hum ...  :)

by (370 points)
 
Powered by Question2Answer
...