I'm changing between PHP 7.1.12 and 7.2.1 on my localhost
(MAMP) so I can update my PHP accordingly to ensure nothing has broken. I have come across a strange problem where when I change between the two versions, I get different results from the SQL query.
SELECT * FROM uploads WHERE upload_artist IN (SELECT following FROM followers WHERE follower = x) ORDER BY upload_id
PHP 7.1.12 returns:
object(stdClass)#5 (...) {
["user_id"]=> string(1) "6", etc...
}
Whereas PHP 7.2.1 returns (notice how it says "upload_id"
instead of "user_id"
) [THIS IS THE CORRECT OUTPUT]:
object(stdClass)#5 (...) {
["upload_id"]=> string(1) "3", etc...
}
Cheers.