.07.05
it's work
3) If you set USB to boot before network, this scenario also works fine.
In a medical procedure, a patient is connected to a medical device by a tubing system, which includes a set of tubes, hoses, and fittings. A connector is provided to connect the tubing system to the medical device. If there is a leak in the tubing system, the connector provides a point for monitoring the leak and for quickly stopping the leak. A common type of connector is a luer lock connector. Some connectors are male and some are female. Some male connectors are made to connect to a male tubing while other male connectors are made to connect to a female tubing.Q:
MySQL statement doesn't seem to return an answer when run in PHP
I have this code here
$stmt = $conn->prepare("UPDATE users SET active = 1 WHERE username =?");
$stmt->bind_param("s", $user);
$user = $_POST['user'];
$stmt->execute();
$stmt->close();
$conn->close();
and it executes correctly.
Now, I want to return the answer so I can check if the user is active or not in PHP. I tried this and it didn't work:
$row = $stmt->get_result()->fetch_assoc();
$user_status = $row['active'];
I'm not sure why this is happening, because when I run the code in MySQL Workbench, it returns the right answer.
A:
You should change your code as follows:
$result = $stmt->get_result();
$row = $result->fetch_assoc();
Related links:
Comments