PHP Notice: Undefined property: stdClass:

Posted by 4D on Stack Overflow See other posts from Stack Overflow or by 4D
Published on 2010-06-18T11:32:18Z Indexed on 2010/06/18 11:43 UTC
Read the original article Hit count: 309

Filed under:

I've got an array coming back from a Flash app created in Flash Builder 4.

I have a service setup that queries and brings data back from the DB successfully, however the Update script is generating the Undefined Property errors.

I'm still learning both PHP and Flash Builder, and don't fully understand what the $this-> commands do.

If anyone can suggest where this script is going wrong, it is basically just generated by Flash Builder and is not something I've developed myself, I would appreciate it?

Also if someone can explain $this-> to me that would be awesome too?

I've seen them before, but then I've seen scripts doing the same thing that do not use them, so is this an old way of doing things?

Really appreciate any input anyone can give.

    public function updateItem($item) {
    // TODO Auto-generated method stub
    // Update an existing record in the database and return the item

    // Sample code \'

          $this->connect();
          $sql = "UPDATE tbltrust SET inst_code = '$item->inst_code', trust_name = '$item->trust_name', trust_code = '$item->trust_code' WHERE  trust_key = '$item->trust_key'";

          mysqli_query($this->connection, $sql) or die('Query failed: ' . mysqli_error($this->connection));

          mysqli_close($this->connection);

}

© Stack Overflow or respective owner

Related posts about php