I have code that stores the results of a mysqli query in an array, but I want to make the code a little more advanced by only storing the results of one column in the array. Here's my code:
// Create array of devices that match the current unit in array $unitsarray
$result = $mysqli->query("SELECT * FROM `department devices` WHERE unit LIKE $unit");
//Fetch all rows in result and store them in an array $rows
$rows = array();
while($row = $result->fetch_row()) {
$rows[] = $row;
}
SELECT mycol FROM...
– Daren Chandisingh 23 hours ago