I'm having a problem with updating a value in a column in my database. I can get it to work if i use
$result1 = mysqli_query($con,"UPDATE Customers SET NextExpectedCut = 222 WHERE Name = 'ruth'");
But I entered all the databases information into an array ($rows).. so there for I tested already by doing:
echo $rows[0][0];
And i get the first customers name on the browser so why cant I get this to work? Am I formatting it wrong or is there a different way to do this?
if(isset($_GET['test']) && $_GET['test'] =="1")
{
$result = mysqli_query($con,"SELECT * FROM Customers");
while($row = mysqli_fetch_array($result))
{
$rows[]=$row;
}
echo $rows[0][0] ." is finished";
$result1= mysqli_query($con,"UPDATE Customers SET NextExpectedCut = 222 WHERE Name = $rows[0][0]");