Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #15583

Re: sql with 3 tables

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail
From alex <alex@nomailno.it>
Newsgroups comp.lang.php
Subject Re: sql with 3 tables
Date Tue, 14 Jul 2015 11:07:08 +0200
Organization Aioe.org NNTP Server
Lines 39
Message-ID <mo2jfo$epg$1@speranza.aioe.org> (permalink)
References <mnauin$3lj$1@speranza.aioe.org> <5s7mx.1583$sG4.1199@fx25.fr7> <mnbfn9$8vo$1@speranza.aioe.org> <tPdmx.10395$Tu1.9098@fx31.fr7>
NNTP-Posting-Host caJKf9+GqYElyHM6/PQWvw.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-15; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.php:15583

Show key headers only | View raw


Il 05/07/2015 19:28, adam ha scritto:
> UPDATE
>      a AS a
> INNER JOIN
>      c AS c
>      ON (c.id = a.ic)
> INNER JOIN
>      b AS b
>      ON (b.id = c.id AND b.x < c.y)
> SET
>      a.totale = a.aa + c.bb

hello
your soution is this
UPDATE a AS a
INNER JOIN c AS c  ON (c.id = a.ic)
INNER JOIN b AS b  ON (b.id = c.id AND b.x < c.y)
SET  a.totale = a.aa + c.bb


I founded and tested and work, this
UPDATE a AS a
INNER JOIN c AS c  ON a.id = c.ic
INNER JOIN b AS b  ON c.id = b.id
SET  a.totale = a.aa + c.bb
WHERE b.x < c.y


your solution is the same?
is more performance seen that the where you use directky in the join?

is always better use after ON () the brackets?


thank



Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

sql with 3 tables alex <alex@nomailno.it> - 2015-07-05 11:49 +0200
  Re: sql with 3 tables adam <adam@nospam.net> - 2015-07-05 10:14 +0000
    Re: sql with 3 tables alex <alex@nomailno.it> - 2015-07-05 12:36 +0200
      Re: sql with 3 tables Luuk <luuk@invalid.lan> - 2015-07-05 19:06 +0200
    Re: sql with 3 tables alex <alex@nomailno.it> - 2015-07-05 16:41 +0200
      Re: sql with 3 tables Jerry Stuckle <jstucklex@attglobal.net> - 2015-07-05 11:18 -0400
      Re: sql with 3 tables adam <adam@nospam.net> - 2015-07-05 17:14 +0000
      Re: sql with 3 tables adam <adam@nospam.net> - 2015-07-05 17:28 +0000
        Re: sql with 3 tables alex <alex@nomailno.it> - 2015-07-14 11:07 +0200
      Re: sql with 3 tables Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-06 03:28 +0200
    Re: sql with 3 tables alex <alex@nomailno.it> - 2015-07-05 18:07 +0200

csiph-web