Skip site navigation (1) Skip section navigation (2)

Re: Weird SQL Problem

From: "Obe, Regina DND\\MIS" <robe(dot)dnd(at)cityofboston(dot)gov>
To: "'operationsengineer1(at)yahoo(dot)com'" <operationsengineer1(at)yahoo(dot)com>,"'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Weird SQL Problem
Date: 2005-09-12 12:24:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I see at least 2 problems with the below.  First you are missing a space
after your WHERE and second your $reworker_notes is not quoted - use the
ADODB qstr for quoting.

It should be something like

$db->Execute('UPDATE t_defect SET
reworker_id = ' . $reworker_id . ', rework_completed =
\'t\', rework_notes = ' . $db->qstr($rework_notes) . ',
rework_date = '. $db->DBDate(time()) . ' WHERE t_defect.defect_id = ' .
$defect_id );

-----Original Message-----
From: operationsengineer1(at)yahoo(dot)com [mailto:operationsengineer1(at)yahoo(dot)com] 
Sent: Wednesday, September 07, 2005 7:49 PM
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] Weird SQL Problem

hi all,

i'm baffled by a sql issue.

i use adodb and the code is as follows (the sql should
be pretty evident - even if you don't follow adodb).

$result_update = $db->Execute('UPDATE t_defect SET
reworker_id = ' . $reworker_id . ', rework_completed =
\'t\', rework_notes = ' . $rework_notes . ',
rework_date = '. $db->DBDate(time()) . 'WHERE t_defect.defect_id = ' .
$defect_id );

my problem is this...  the text input for
$rework_notes kicks out a pgsql error as follows...

'ERROR: column "aaaaaaaaaaaaaa" does not exist'

where "aaaaaaaaaaaaaa" is what i entered in the
$rework _notes text area.

what am i missing here?  why is pgsql trying to find
the column? rework_notes is varchar and i've done
inserts for similarnote setups right and left with no


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


pgsql-novice by date

Next:From: operationsengineer1Date: 2005-09-12 21:16:40
Subject: Re: Weird SQL Problem, Heredoc + Bind Parameters Solution + Questions
Previous:From: Sean DavisDate: 2005-09-12 11:49:19
Subject: Re: tutorial

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group