从mysql行获取信息

I don't know much of mysql and php and stuff but I'm trying to get if a value from the database is true or not. I know the name of the column in mysql, and it's called verified. Now there's a bit of code I've found which I think it is for calling this verified column from mysql

function SK_getUser($timeline_id=0, $all=false) {
    global $dbConnect, $sk;
    $timeline_id = SK_secureEncode($timeline_id);

    $query_two = "SELECT $subquery_one FROM " . DB_ACCOUNTS . " WHERE id=" .     $sql_fetch_one['id'] . " AND active=1";
        $sql_query_two = mysqli_query($dbConnect, $query_two);

    if (mysqli_num_rows($sql_query_two) == 1) {
        $sql_fetch_two = mysqli_fetch_assoc($sql_query_two);

        if (isset($sql_fetch_two['verified'])) {
            $sql_fetch_two['verified'] = ($sql_fetch_two['verified']==1) ? true : false;
        }

    }
}

I've seen this row being called too like this in the code

if ($sk['timeline']['verified'] == true) { 
// some code here
}

But when I try to call this function like this on other parts of the website it doesn't work. So I was trying to create this same action but be able to insert anywhere else on my website. Can you help me?

$row = mysql_fetch_array($sql_query_two);
if( isset($row['verified']) ){
   //TRUE
}else{
  //FALSE
}

To start off, all php variables must start with $. in the first line DB_ACCOUNTS is without '$'. Secondly, in the first line, "SELECT $subquery_one FROM " there you try to select a column, but you seem to be invoking a php variable since it starts with '$'

MySQL doesn't have boolean types. It has a column type that pretends it's boolean, but it's really just a one-digit integer that can be 0 or 1. The key bit in the code you've pasted is:

$sql_fetch_two['verified'] = ($sql_fetch_two['verified']==1) ? true : false;

Which is equivalent to:

if( $sql_fetch_two['verified'] == 1 ) {
  $sql_fetch_two['verified'] = true;
} else {
  $sql_fetch_two['verified'] = false;
}

?: is the Ternary Operator, which is essentially shorthand for if/else blocks.

Anyhow, the conversion from an integer to a boolean type isn't strictly necessary in PHP because of Type Juggling.