Service is passing Null when value is not Null


i have php service inserting user database. php function looks this:

 

public function insertuser($item) {     $stmt = mysqli_prepare($this->connection,          "insert users ( fb_id, name, birthday, firstname,               gender, hometown, lastname, location, username,               link,age)                values (?, ?, ?, ?, ?, ? , ?, ?, ?, ?, ?)");     $this->throwexceptiononerror();      mysqli_bind_param($stmt, 'ssssssssssi',                $row->fb_id, $row->name, $row->birthday, $row->firstname,               $row->gender, $row->hometown, $row->lastname, $row->location, $row->username,               $row->link,$row->age);     $this->throwexceptiononerror();      mysqli_stmt_execute($stmt);     $this->throwexceptiononerror();      $autoid = mysqli_stmt_insert_id($stmt);      mysqli_stmt_free_result($stmt);     mysqli_close($this->connection);      return $autoid;   } 

 

when introspect service creates insertuser(item:object) : object

 

when try test operation create object looks this:

{      fb_id:"12",      name:"a",      birthday:"2010-12-12",      firstname:"a",      gender:"male",      hometown:"a",      lastname:"a",      location:"a",      username:"a",      link:"a",      age:30 } 

 

i error:

 

 

invocationtargetexception:there error while invoking operation. check server settings , try invoking operation again.   reason: server error mysql error - 1048: column 'fb_id' cannot null #0 c:\wamp\www\phptest\userservice.php(351): userservice->throwexceptiononerror() #1 [internal function]: userservice->insertuser(object(stdclass)) #2 [internal function]: reflectionmethod->invokeargs(object(userservice), array) #3 c:\wamp\www\zendframework\library\zend\server\reflection\function\abstract.php(368): call_user_func_array(array, array) #4 c:\wamp\www\zendframework\library\zend\amf\server.php(356): zend_server_reflection_function_abstract->__call('invokeargs', array) #5 c:\wamp\www\zendframework\library\zend\amf\server.php(356): zend_server_reflection_method->invokeargs(object(userservice), array) #6 c:\wamp\www\zendframework\library\zend\amf\server.php(550): zend_amf_server->_dispatch('insertuser', array, 'userservice') #7 c:\wamp\www\zendframework\library\zend\amf\server.php(626): zend_amf_server->_handle(object(zend_amf_request_http)) #8 c:\wamp\www\facebookuserstatusair-debug\gateway.php(69): zend_amf_server->handle() #9 {main} 

 

 

any idea doing wrong? apparently thinks values null when not.

i not php guy still try answer it:

 

i think giving fb_id as:

 

fb_id:"12"

 

which should perhaps:

 

fb_id:12 (without quotes)

 

hope helps.



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support