I am using SOAP library web service for Android. I have this web service.
function ws_put_q_answers($ids, $date, $users, $completeds, $idstores, $checkins, $checkouts, $locations)
{
include "conn.php";
for($i = 0; $i < sizeof($ids); $i++){
$id = $ids[$i];
$date = $date;
$user = $users[$i];
$completed = $completeds[$i];
//$noReplies = $nosReplies[$i];
$idstore = $idstores[$i];
$checkin = $checkins[$i];
$checkout = $checkouts[$i];
$location = $locations[$i];
$sql = "INSERT INTO q_answers([id_questionnarie], [date], [user], [completed], [noReplies], [id_store], [checkin], [checkout], [location])
VALUES (". $id .", '" . $date . "', '". $user . "', ". $completed . ", 0, " . $idstore . ", '" . $checkin . "', '" . $checkout . "', '" . $location . "')";
//$sql = "INSERT INTO q_answers([id_questionnarie], [date], [user], [completed], [noReplies], [id_tienda], [checkin], [checkout])
//VALUES (". $id .", '" . $date . "', '". $user . "', ". $completed . ", 0, " . $idstore . ", '" . $checkin . "', '" . $checkout . "')";
$query = $db->prepare($sql);
$query->execute();
}
if (!$db) {
die('ERROR.. No se logro la conexion con la BD TFBO');
return(0);
}
else {
//$processReturn = $val0;
return(1);
}
}
The problem is that sometimes (VERY RARE IN the "checkout" column) it inserts the word "Array" as such.
All the parameters that I send are Arrangements, I go through them and I save temporary variables.
Any idea why this happens sometimes?