Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Matthew Carter Newsgroups: comp.lang.php Subject: Re: sql how capture on the fly the row's id when is updated Date: Sat, 01 Aug 2015 16:13:09 -0400 Organization: Ahungry (http://ahungry.com) Lines: 35 Message-ID: <87614yojhm.fsf@ahungry.com> References: <87a8uaokt1.fsf@ahungry.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="7c986cd4736462de309a749b207746fe"; logging-data="6109"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zmixn93jAldJ/ZFASW5sR" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:HpS20zxlDEFmee5zxSmz458lbmo= sha1:bfTOJSOJhxFSE3+XbA5E9+FIg5g= Xref: csiph.com comp.lang.php:15623 alex writes: > Il 01/08/2015 21:44, Matthew Carter ha scritto: >> UPDATE a AS a >>> INNER JOIN c AS c ON a.id = c.id >>> SET a.total = 1 >>> WHERE b.x < c.y > > if I do this sql (same but how select): > > SELECT a.id > FROM a AS a > INNER JOIN c AS c ON a.id = c.id > WHERE b.x < c.y > > I have solved? > > > and with this php code > > $result = mysql_query("SELECT ...."); > $results = array(); > while($row = mysql_fetch_assoc($result)) > { > $results[] = $row; > } Apparently you do not understand what I wrote, and unfortunately I do not understand what you wrote. Sorry. -- Matthew Carter (m@ahungry.com) http://ahungry.com