Select orthographic mistake with the mouse pointer and press Ctrl+Enter. Let’s make our language cleaner!
Якщо помітите помилку на цій сторінці, будь ласка, виділіть її вказівником миші та натисніть Ctrl+Enter. Зробімо наше мовлення чистішим!

2007-04-02

It happens sometimes...

SELECT
 orig.id, orig.plinkSerial, orig.msgIndex, orig.address, orig.method,
 orig.picPath, orig.eventType, orig.location,
 IF (trans.translation IS NULL, orig.template, trans.translation) as template
FROM
(SELECT
   m.id, m.plinkSerial, m.msgIndex, m.address, m.method, m.picPath,
   e.eventType,
   g1.value as location, g2.value as template
  FROM `eventMessages` as m, `events` as e,
   `global` as g1, `global` as g2
  WHERE m.msgIndex=e.msgIndex
   AND g1.name=e.locationId AND g1.tableId=6
   AND g2.name=e.profileId AND g2.tableId=8
   AND m.status=1) as orig
 LEFT OUTER JOIN
 (SELECT
   v.capStr as translation, w.serial, n.name
  FROM
   `captionVal` as v,
   `captionName` as n,
   `groups` as g,
   `webcoms` as w
  WHERE
   v.capId=n.captionNo AND
   v.languageId=g.lang_id AND
   g.groupId=w.grp) as trans
  ON trans.serial=orig.plinkSerial AND trans.name=orig.template

Немає коментарів: