Medoo icon indicating copy to clipboard operation
Medoo copied to clipboard

Question: Does get() do a LIMIT 1?

Open kladskull opened this issue 3 years ago • 1 comments

Just curious if we need to add 'limit' = 1 to all get statements?

kladskull avatar Feb 13 '22 15:02 kladskull

Yeah, it does.

$email = $database->get("account", "email", [
	"user_id" => 1234
]);

Will create the following query

SELECT `email` FROM `account` WHERE `user_id` = 1234 LIMIT 1

drewdeakin avatar Feb 18 '22 01:02 drewdeakin