So I came across another problem.
I have this piece of code:
$query = mysqli_query($mysqli_connect,"
SELECT profileCode
FROM personprofile5
WHERE profileId = '$url'
LIMIT 30
");
$sqlObject = mysqli_fetch_array($query);
$output = $sqlObject['profileCode'];
if(!empty($output)){
echo count($sqlObject);
echo '</br></br>';
print_r($sqlObject);
} else {
echo 'This page does not exist.';
}
The problem is that it should return 2 when echoing the count. And it does, but it's because there is a $sqlObject[0]
and a $sqlObject['profileCode']
(with the same results) which isn't the way it should be.
I want my mysqly to return ALL the values in that column.
So who can help me?