Hello, please I need help with this problem. I am writing a web project using PHP. I have developed a wsdl for this project. Whenever I send a request from my cliet side, the server script handles it appropriately by calling the relevant function. However, the script returns null values. I have done a logging operation of the return values when I run the server script as a stand-alone script assessing a database (in this case, I copy the function unto the new blank script and do a var_dump. In this case, I get the expected results. But this is not the case when I access the client script from my browser. Rather, NULL values are returned and no errors. The logged message in this case goes thus: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '11:34:27)' at line 1".
I have tested the procedure by calling it within MySQL Client Browser using this statment:
CALL Details('1234569219', '9078563412', '2007-07-05 11:08:23');
and it works well.
$rdt is a DATETIME value.
function GetStudentDetails($machine_id, $request_id, $card_no, $rdt )
{
$mysqli=new mysqli();
$mysqli->connect("localhost", "my_username", "my_password", "my_db");
if ($mysqli->multi_query("CALL Details($request_id, $card_no, $rdt);"))
{
do
{
if ($result = $mysqli->store_result())
{
while($row = $result->fetch_row())
{
Operation_Log($row);
$rv_gsd = array('request_id' => $request_id, 'response_id' =>$request_id, 'card_no' => $row['card_number'],
'status' => $row['result_status'], 'err_msg' => $row['result_message']);
}
$row->close();
}
}while($mysqli->next_result());
}
else
{
Operation_Log(sprintf("<br />First Error: %s\n", $mysqli->error()));
Operation_Log($rdt);
}
return $rv_gsd;
Operation_Log is a function that writes the argument passed to a file.