I was wondering how would go about executing two different queries like this:
if ($uresult->num_rows >0) {
while($urow = $uresult->fetch_assoc()) {
$rresult = mysqli_query($con,"SELECT * FROM allid WHERE postid='$oldid' AND spaceid='$newid'");
$rresult = mysqli_query($con,"DELETE FROM allid WHERE postid AND spaceid IS NULL");
$lrow = mysqli_fetch_assoc($rresult);
$tem = $lrow['postid'];
$ujson = json_encode($tem);
echo $ujson;
}
} else {
}
I know mysqli_fetch
can't hold no more than one query and there are similar questions, but I can't seem to understand the answers from the other questions. If there is a question that solves this question, I apologize and will delete this one.