Quote:
Originally Posted by FreshFroot
As for the vB database function, which one is that? Are you refering to "$vbulletin->-db" Because if so, I tried that and got the same error.
|
Yeah, that's what I meant. There probably isn't any reason you can't use mysql functions directly, but using vbulletin functions you probably had the same problem for the same reason - you needed to call $db->fetch_array() on your result. But if you know you only want one row you can use $db->query_first and what you get back will be an array with the column names as keys. So your code would be
Code:
$result = $db->query_first($the_username);
$mrs_username = $result['username'];