Jayprakash12345
Hello Everyone, I made locally SQL table in enwiki database called ‘mytable’, and It has 3 fields ‘id’, ‘userid’ and ‘status’. So How I can get ‘status’ value from database? and ‘userid’ will be given as input.
I have tried this.
function getStatus ( $userid )
{
$dbr = wfGetDB( DB_REPLICA ); // Only for read, not write
$row = $dbr->select(
'mytable',
[
'status'
],
[
'userid' => $userid
],
__METHOD__
);
}
But on echo,
Recoverable fatal error: Object of class Wikimedia\Rdbms\ResultWrapper could not be converted to string in C:\xampp\htdocs\Dev\core\extensions\Blah\include\Blah.php on line 29
How I can get values in string?