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);"))
    if ($result = $mysqli->store_result())
    while($row = $result->fetch_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']);
     Operation_Log(sprintf("<br />First Error: %s\n", $mysqli->error()));
   return $rv_gsd;

Operation_Log is a function that writes the argument passed to a file.

11 Years
Discussion Span
Last Post by tunday

The Operation_Log logs all the values I'm using into a file. When I check the file, a valid date is returned. When I logged the reply from the database, I found out it was complaining about the SQL syntax. So I had to make use of theWhat I discovered was that I modify the code to make it work.

if[/B] ($mysqli->multi_query("CALL CardBalance('".$request_id."', '".$card_no."', '".$rdt."');"))


This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.