Doing a mysqli query and COUNTing the results, is there a preferred comparison operator & string enquoting to use?
For example
$query = mysqli_query($connect, "SELECT COUNT(`user_id`) FROM `users` WHERE `user_color` = '{$color}'");
$result = mysqli_fetch_assoc($query);
if ($result['COUNT(`user_id`)'] != 0){
-- then do something....
My question is, what are the implications of using:
if ($result['COUNT(`user_id`)'] != '0'){
versus
if ($result['COUNT(`user_id`)'] != 0){