I’m trying to LIMIT the database output with 5, but it’s only selecting 4. And yes, I’m sure there’s more then 4.
$sql = "SELECT * FROM lookup
INNER JOIN lookupCategories
ON lookup.FK_lookupCategory=lookupCategories.lookupCategoriesId
INNER JOIN lookupType
ON lookup.FK_lookupType=lookupType.lookupTypeId
INNER JOIN authentication
ON lookup.FK_lookupUserId=authentication.userId
WHERE FK_lookupUserId='$_GET[id]'
ORDER BY lookupId DESC
LIMIT 5";
My code looks like this. What could be wrong? 🙂
Thanks in advance.
I would suggest that there are only 4 entries that match – to prove or disprove this, try your query without the
LIMITand see how many results are returned: