PDA

View Full Version : Need some help Selecting userid's DB entry?


Dr.CustUmz
03-08-2021, 12:02 PM
Ok I have NO idea whats going on, in all senses this should be working.

I have a query that works perfect:
SELECT *
FROM logins
WHERE userid = 1
ORDER BY phpdate ASC
LIMIT 5

I convert it to plugin format replacing the WHERE clause with current user's ID and it no longer works, I have tried:
WHERE userid = " . $vbulletin->GPC['userid'] . "
WHERE userid = " . $vbulletin->userinfo['userid'] . "
WHERE userid = " . $bbuserinfo['userid'] . "

yet I'm getting errors every time and my results are not showing =/