I have a script that I want to be able to convert an entered username (in $username) to the userid (in $userid).
I found an old thread for vb 3.0 here:
https://vborg.vbsupport.ru/showthread.php?t=61558
I tried to use the code suggested in there as follows:
Code:
$getuser = $vbulletin->db->query("
SELECT userid,username
FROM myuser
WHERE username = $username
");
$user = $DB_site->fetch_array($getuser);
echo("The userid for $user[username] is <b>$user[userid]</b>");
I know my post is getting the correct $username into this but I am getting a MYSQL error that says...
I just can't finish my minor addition until I can get this basic change of $username into $userid
I really do appreciate any help as I have tried all kinds of combinations for the past 4-hrs or more and I am just stumped...