Hello all im new to this been playing with it for a week but i play with c# making games so it's not to different. im 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?
thanks Tommy
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]");