raytravel
-
Posts
2 -
Joined
-
Last visited
Posts posted by raytravel
-
-
I wrote a simple mysql record update.
mysqli_query($link, "UPDATE photo01 SET PhotoText='abcd' WHERE id= '1' ");
Work fine until I use a variable:
mysqli_query($link, "UPDATE photo01 SET PhotoText= $ZZ WHERE id= $x ");
If $ZZ contains only number it updated the cell.
ANY letters does not.
The cell is text and standard US ASCII
I tried:
mysqli_query($link, "UPDATE photo01 SET PhotoText={$ZZ} WHERE id={$x}");
same problem
Here is my loop:
<?php
for ($x = 0; $x < 131 ;$x++) {
$ZZ = $_POST["z".$x];
if ($ZZ != '') {mysqli_query($link, "UPDATE photo01 SET PhotoText={$ZZ} WHERE id={$x}");
}
}
?>
mysqli_query problems
in PHP Coding Help
Posted
This finally worked: