I have a situation where I also need to convert a USERNAME from a template to a USERID inside a main php file....
I tried to use the code above in my file like this:
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 would really appreciate any help!