mysql - How fetch specified column by rows number in PHP -
i have table 5 column , lot of rows. want fetch column number 3 each rows select db , store them in variables compare together.
for example data:
row 1 | column 1 column 2 column 3 row 2 | column 1 column 2 column 3
then want store column 3 each rows , store them in variables , compare variables :
variable 1 (row 1 , column 3) >= or =< variable 2 (row 2 , column 3)
$query = "select * table"; $results = mysqli_query($con, $query); $var = []; while ($row = mysqli_fetch_array($results)) { $var[] = $row['column3']; }
then can variables array.
Comments
Post a Comment