MySQL Forums
Forum List  »  PHP

Re: Arbitrary update of fields - Strange ...
Posted by: Dr. Thomas W. Richter
Date: July 09, 2020 02:30AM

Peter Brawley Wrote:
-------------------------------------------------------
> Implementation logic has failed at at least one
> point in your process To find where that is,
> you'll need to stub out every relevant step of the
> process to a log.

Sorry, but I do not think so. The program logic is very easy and on the test side there no effect, on production side there is this strange behavior. The difference is that one the one side there is no movements whereas on the other one there are movements (update, read, write). I have debugged the android program (java) - and no fault. I must be a fault on php or mysql side.

The program:

<?php

// gibt es einen Nutzer?
/* Gibt es einen Datensatz, der noch in Bearbeitung (status=0) ist? */
// Vorbelegung


if($_SERVER["REQUEST_METHOD"] == "POST") {
require "connect.php";
require "getUser.php";
global $link;

$user = $_POST['persNo'];

// Ist User ├╝berhaupt verhanden?
$row = getUser($link);
if ($row == 0 )
$result = "02"; // Kein User NOUSER
else {
if ( $row["pauseStatus"] == 1 ) // PAUSED Pause schon gestartet
$result = "11"; // PAUSED
else {
// Startzeit setzen und Pausenstatus auf besetzt setzen (1)
$dquery = "UPDATE LOW_PRIORITY staffmember SET pauseStart = NOW(), pauseStatus = 1 WHERE persNr = ".$user.";";
$dresult = mysqli_query($link, $dquery) or die(mysqli_error());
$result = "01"; // ISOK
}
}
mysqli_close($link);

echo $result;
}
?>

Options: ReplyQuote


Subject
Written By
Posted
Re: Arbitrary update of fields - Strange ...
July 09, 2020 02:30AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.