Re: Bad Boolean external represenation *HELP*!

From: Jason Earl <jearl(at)xmission(dot)com>
To: "A K" <kirk3_16(at)hotmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Bad Boolean external represenation *HELP*!
Date: 2005-02-23 07:09:45
Message-ID: 87ekf7da6e.fsf@xmission.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"A K" <kirk3_16(at)hotmail(dot)com> writes:

> Hi
>
> Not sure if this belongs in novice or somewhere a bit 'higher' but
> I'll stick it here anyway.
>
> I'm running a series of PHP scripts through postgre 7.3.4 at college
> to create an online portfolio creator (if that makes sense)
>
> Anyway, this piece of code is throwing out Warning: pg_query(): Query
> failed: ERROR: Bad boolean external representation 'testuser2' in
> xxxxxxxxx/task.php on line 90
>
> Here is the segment that the error is reporting:
>
> if ($GroupTask == 'No')
> {
> print("Error: This task is not set as a group task.<br/>
> To access this task the task creator must alter the task settings.<br/>
> Click <a href=\"taskmain.php\">here</a> to
> return to the main task page.");
> }
>
> else
> {
> print("<a href=\"journal.php\">Journal</a>
> <a href=\"schedule.php\">Schedule</a>
> <a href=\"document.php\">Documents</a>
> <a href=\"links.php\">Links</a>
> <a href=\"contacts.php\">Contacts</a><br/><br/>
> <h2>$GroupTaskName</h2><br/>
> This task created by <strong>$GroupTaskCreatedBy</strong><br/><br/>
> Hello $Username<br/>
> This task was last accessed on $LastAccessed by $LastEdited");
>
> $UpdateQuery = "UPDATE tasks SET LastEdited =
> '$Username' AND LastAccessed = '$timestamp' WHERE UniqueID =
> '$UniqueGroupID' and TaskID = '$GroupTaskID';";
>
> Line 90--> $UpdateQueryExecute = pg_query($DBconnection, $UpdateQuery);
>
> I cannot understand why it is throwing it back, particularly as I'm
> running virtually the exact same update query elsewhere in the same
> script :|
>
> Any help or advice HUGELY appreciated.
>
> Adam
>

You have an "AND" after LastEdited = '$Username' you probably want a
',' instead.

$UpdateQuery = "UPDATE tasks
SET LastEdited = '$Username', LastAccessed = '$timestamp'
^
|- Look here

Jason

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2005-02-23 08:18:16 Re: Copy can't parse a float?
Previous Message John Napiorkowski 2005-02-23 06:11:24 Support for RETURNING xxx INTO yyy for INSERT and UPDATE?