Hello,

I have following situation:

a mySQL-database with a table containing 3 fields :
      - ID : INTEGER : AUTO INC
      - description : VARCHAR(100)
      - flaggedForDeletion : TINYINT(1)

Some of the records are :
      1     This is a test               0
      2     This is also a test     0


I created a valueObject Record :
      var recordID:Integer;
      var recordDescription:String;
      var flaggedForDeletion:Boolean;


When starting my Flex application I get all records from the database
and add them into an ArrayCollection, which acts as dataprovider for a 
datagrid. By dragging a record from the datagrid to a recyclebin, I want
to update the record, meaning setting flaggedForDeletion = 1.
Therefore I created a variable recordToUpdate of type Record and map all
fields of the datagridrecord to the appropriate variable of
recordToUpdate.
Using my remoteObject myRO.UPDATE_RECORD.send(recordToUpdate) the
request will be handled on serverside by a PHP-script :

function updateRecord ($pNewRecord) {
    $strSQL = "UPDATE tblRecords" .
                         "SET description =
'".$pNewRecord[recordDescription]."', ".
                                  "flaggedForDeletion =
".$pNewRecord[flaggedForDeletion]." ".
                         "WHERE ID = ".$pNewRecord[recordID];

    return $strSQL;
}

The query is not executed, and when I return my SQL-string, it tells me
that the value for flaggedForDeletion does not contain any value.

When I debug my application, the values of my
recordToUpdate.flaggedForDeletion seem to be OK.

Anyone has any idea what I do wrong?

Thanks

Reply via email to