I need to show all labels in this device... Can i do it? i try with the LABEL table, no success



select MACHINE.NAME,
MACHINE.IP,
MACHINE.MAC,
OS_NAME,
MACHINE.USER_LOGGED, 
MACHINE.LAST_SYNC,
MACHINE.CS_MANUFACTURER,
MACHINE.CS_MODEL,
MACHINE.RAM_TOTAL,
MACHINE.CLIENT_VERSION,
MACHINE.ID ,
from 
MACHINE 

WHERE ((MACHINE.NAME = 'wks-06136'))
1 Comment   [ + ] Show Comment

Comments

  • The wizard can do that for you. Have you tried?
    Change system name field towards bottom.

    also try this instead in your code. You may also not need the (( )), single might do.

    WHERE ((MACHINE.NAME = '%wks-06136%'))

    -------------------

    SELECT MACHINE.NAME AS SYSTEM_NAME, (SELECT group_concat(distinct if(LABEL.NAME not like 'HDN_LABEL_%', LABEL.NAME, 'System Hidden') separator '\n') FROM MACHINE_LABEL_JT MLJT INNER JOIN LABEL ON MLJT.LABEL_ID = LABEL.ID WHERE MACHINE.ID = MLJT.MACHINE_ID ORDER BY LABEL.NAME) as LABEL_NAME, MACHINE.CLIENT_VERSION, MACHINE.IP, (UNIX_TIMESTAMP(LAST_SYNC))as LAST_SYNC_SECONDS, MACHINE.MAC, OS_NAME, USER_LOGGED, CS_MANUFACTURER, CS_MODEL, RAM_TOTAL FROM MACHINE LEFT JOIN MACHINE_LABEL_JT ON (MACHINE_LABEL_JT.MACHINE_ID = MACHINE.ID) LEFT JOIN LABEL ON (LABEL.ID = MACHINE_LABEL_JT.LABEL_ID) WHERE ((MACHINE.NAME like '%INSERT YOUR SYSTEM NAME HERE%')) GROUP BY MACHINE.ID ORDER BY SYSTEM_NAME
    • dont :(
      and its work! I will try to use more the wizard...

      Thank you so much...
Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity