From: Andrew McMillan <andrew@morphoss.com>
To: pgsql-php@postgresql.org
Subject: Re: UPDATE (SELECT ) is not working................
Date: Fri, 17 Jan 2014 22:04:11 +1300
Message-ID: <1389949451.3503.33.camel@narbon.home.mcmillan.net.nz> (raw)
In-Reply-To: <CACa6=i2M7HRJDpJRwZj6ckotLe9nRd9TgAi8_cdFiVg-S92ijA@mail.gmail.com>
References: <CACa6=i2M7HRJDpJRwZj6ckotLe9nRd9TgAi8_cdFiVg-S92ijA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-php>
On Fri, 2014-01-17 at 13:58 +0530, Archana K N wrote:
> Hello,
>
>
> I am trying to update a database with values from another . Am
> using Debain(Linux) OS.
>
>
> When I try to update no error is displayed. But column is not
> updated.
> I am using the psql console for querying.
>
>
> my code is as follows(along with result):-
>
>
> ""my_db=# update test set id=g.id2 from (select id2 from test2)as g ;
> UPDATE 0
Your SQL does not do what you think it does.
You should probably test your SQL at the psql command line to figure out
the correct way to do what you want to do before you try and post to a
PHP mailing list about this kind of thing.
I'd offer advice, but I can't figure out from your statement what you're
trying to do your database either.
Cheers,
Andrew.
--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64 (2) 7233 2426
IOT trap -- core dumped
------------------------------------------------------------------------
--
Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: andrew@morphoss.com
Subject: Re: UPDATE (SELECT ) is not working................
In-Reply-To: <1389949451.3503.33.camel@narbon.home.mcmillan.net.nz>
References: <CACa6=i2M7HRJDpJRwZj6ckotLe9nRd9TgAi8_cdFiVg-S92ijA@mail.gmail.com> <1389949451.3503.33.camel@narbon.home.mcmillan.net.nz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox