Ok, I don't use php often enough to remember it when I wander back into it. I'm going a bit crazy with this one. I'll post the code below but a few quick explanations. con.php is a php file that creates the database connection $wkHook. There is no issue at all with the connection, so that is not my problem. Basically, I am selecting data from one table, storing it, and then looping through it. In that loop I am trying to insert the data into another table. You will notice that I am echoing $mid in the loop, this is to let me know that the loop itself is working. And it is working. When I loop through every value for $mid is echoed. The query inside the loop, however, is doing nothing. It doesn't even have the decency to throw an error. It just runs through and the loop as if the query wasn't there.
require('con.php');
$runonce=$wkHook->prepare("select moveId, Max, Hev, Work, Split, Rps from Movement order by movementId asc");
$runonce->execute();
$runonce->store_result();
$runonce->bind_result($mid, $max, $hev, $wrk, $spt, $rps);
$user=1;
while($runonce->fetch())
{
echo $mid."<br>";
$runup=$wkHook->prepare("insert into Entry
(userId, movementId, Max, Hev, Work, Split, Rps)
values
(?, ?, ?, ?, ?, ?, ?)");
$runup->bind_param('iisssss', $user, $mid, $max, $hev, $wrk, $spt, $rps);
$runup->execute();
}
$runup->close();
$runonce->close();
$wkHook->close();