MySQL queries in WordPress

I found the errors thanks to the help from @Milo

@Milo’s query on catno pointed me to my error with my first query involving catno, and I also noticed a double equals in $catno == $row[0]; when it should be $catno = $row[0];

Final coding is

function QueryStock($cat) {
    $query = "SELECT * FROM stock WHERE catno = '$cat'";
    global $wpdb;
    $row = $wpdb->get_row($query, ARRAY_N);
        $catno = $row[0];
        $itemname = $row[2];
        $price = $row[4];
        $stock = $row[5];

    echo "There are " . $stock . " bears, the price of each bear is £" . $price;
}