Bad Boolean external represenation *HELP*!

Поиск
Список
Период
Сортировка
Искать

Bad Boolean external represenation *HELP*!

От:
"A K" <kirk3_16@hotmail.com>
Дата:
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.
To access this task the task creator must alter the task settings.
Click here to return to the main task page."); } else { print("Journal Schedule Documents Links Contacts

$GroupTaskName


This task created by $GroupTaskCreatedBy

Hello $Username
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

Re: Bad Boolean external represenation *HELP*!

От:
Jason Earl <jearl@xmission.com>
Дата:
"A K"  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.
> To access this task the task creator must alter the task settings.
> Click here to > return to the main task page."); > } > > else > { > print("Journal > Schedule > Documents > Links > Contacts

>

$GroupTaskName


> This task created by $GroupTaskCreatedBy

> Hello $Username
> 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
FAQ