why
$query = "SELECT * FROM `users` WHERE `id` = '$search' OR `email` = '$search' LIMIT 1";
`id` = UNSIGNED INTEGER(10), `email` = VARCHAR(255)
why the query results are so strange, I think the image is explained on its own, but I also need a word, so here it is, when the user searches for dcm2@example.com or something else does not exist, no results, but if the line starts with a number and looking for PRIMARY KEY, it turns the string into an integer, if I look for 2dcm1@example.com , return ID 2, any good explanation and why is this happening?



source
share