Re: Bad Boolean external represenation *HELP*!

Поиск
Список
Период
Сортировка
От Jason Earl
Тема Re: Bad Boolean external represenation *HELP*!
Дата
Msg-id 87ekf7da6e.fsf@xmission.com
обсуждение исходный текст
Ответ на Bad Boolean external represenation *HELP*!  ("A K" <kirk3_16@hotmail.com>)
Список pgsql-novice
"A K" <kirk3_16@hotmail.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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Stefan.Ardeleanu@siveco.ro
Дата:
Сообщение: Help in dynamic execution in plpgsql
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Copy can't parse a float?