wpdb在'where子句'错误中的SQL未知列'username'

I've been trying to wrap my head around why my query doesn't return any results from my table. My table name is wp_user_orders. The column user_name is in that table. Both prepare and query return empty arrays. The get result with the query inside returns the database error.

PHP:

<?php 
    $dirName1 = 'C:/wamp/www/c2c/wp-content/themes/flawless-v1-01';
    $dirName2 = 'C:/wamp/www/c2c';
    require_once($dirName1.'/config/setup.php');
    require_once($dirName2.'/wp-config.php');
    require_once($dirName2.'/wp-load.php');
    require_once($dirName1.'/include/function/encryption-class.php');
    require_once($dirName1.'/include/function/price-calculations.php');

    define('WP_DEBUG', true);
    $wpdb->show_errors();
    $tableName = $wpdb->prefix . "user_orders";
    $user = wp_get_current_user();
    $userId = $user->ID;
    $userName = $user->user_login;
    echo $tableName . ':  ' . $userId . ': '. $userName; 
    echo var_dump($tableName); 
    echo var_dump($userId); 
    echo var_dump($userName); 
    $myQuery = $wpdb->prepare("SELECT * FROM $tableName WHERE user_name = %s", $tableName, $userName);
    $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM %s WHERE user_name = %s", $tableName, $userName), ARRAY_A);
    $results2 = $wpdb->get_results($wpdb->query("SELECT * FROM $tableName WHERE user_name = $userName"));
    print_r($results2);
    echo var_dump($results2);
    print_r($results);
    echo var_dump($results);

    $wpdb->print_error;


?>

My php displays:

 wp_user_orders: 2: kronus

string 'wp_user_orders' (length=14)

int 2

string 'kronus' (length=6)

WordPress database error: [Unknown column 'kronus' in 'where clause']
SELECT * FROM wp_user_orders WHERE user_name = kronus

null

Array ( )

array (size=0)
  empty

I have a feeling I'm just missing something obvious, but I'm stumped.

UPDATED:

Updated my incorrect prepared statement.

Previous:

$wpdb->prepare("SELECT * FROM $tableName WHERE `user_name` = %s", $tableName, $userName)

New:

$wpdb->prepare("SELECT * FROM %s WHERE `user_name` = %s", $tableName, $userName)

New Error from change:

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''wp_user_orders' WHERE `user_name` = 'kronus'' at line 1]
SELECT * FROM 'wp_user_orders' WHERE `user_name` = 'kronus'

You are not either quoting your username or preparing your query with a variable, I would suggest doing it this way

$results = $wpdb->get_results($wpdb->prepare("SELECT * FROM $tableName WHERE user_name = %s",$username));