<?php
error_reporting(E_ERROR);
ini_set('session.cache_limiter','public');
session_cache_limiter(false);
session_start();
include "db_connect_nb.php";
$qry = "SELECT * from selections";
$res = mysqli_query($link, $qry);
$nr = mysqli_num_rows($res);
echo " nr = " . $nr . "<br>";
$nx = 0;
for ($i = 0; $i < $nr; $i++) {
if ($i == 0){
echo "entered loop<br>";
}
$s = mysqli_fetch_array($res,MYSQLI_ASSOC);
$qryo = "select * from proj_opts where pid = " . $s['pid'] . " and ruid = " . $s['ruid'];
echo "qry from opts " . $qryo . "<br>";
$reso = mysqli_query($qryo);
$npo = mysqli_num_rows($reso);
echo "npo = ". $npo . "<br>";
if ($npo != 0) {
$qryu = "UPDATE sel_opts set selno = " . $s['selno'] . " where pid = " . $s['pid'] . " and ruid = " . $s['ruid'];
echo "qry for uptade sel_opts = " . $qryu;
$resu = mysqli_query($link, $qryu);
$nx++;
}
}
echo $nx . " records updated.";
exit;
?>
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.