Re: UPDATE (SELECT ) is not working................ - Mailing list pgsql-php

From Andrew McMillan
Subject Re: UPDATE (SELECT ) is not working................
Date
Msg-id 1389949451.3503.33.camel@narbon.home.mcmillan.net.nz
Whole thread Raw
In response to UPDATE (SELECT ) is not working................  (Archana K N <archanakknn@gmail.com>)
Responses Re: UPDATE (SELECT ) is not working................  (Archana K N <archanakknn@gmail.com>)
List pgsql-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
------------------------------------------------------------------------




pgsql-php by date:

Previous
From: Archana K N
Date:
Subject: UPDATE (SELECT ) is not working................
Next
From: Archana K N
Date:
Subject: Re: UPDATE (SELECT ) is not working................