Cannot retrieve the table index using get_row

[ad_1]

I have a custom table – user_registrations – in my wordpress database which is updated via a plugin.
All the data in the table is completely available and displayable to me using get_row as follows:

$loop_count = 0;
					
//*****
//***** set up the query and retrieve all records from the user table corresponding to this email address		
$sql_query = $wpdb->prepare ("SELECT * FROM user_qualifications WHERE user_contact_email=%s AND user_status=%s ORDER BY user_registration_id", $current_user->user_email, "Submitted") ;
$row = $wpdb->get_row($sql_query, OBJECT, $loop_count);
								
while ($loop_count < $record_count) {

... some other code

	echo "<td><p>" . addslashes($row->user_ridername) . "</p></td>" ;
	echo "<td><p>" . addslashes($row->user_horsename) . "</p></td>" ;
	echo "<td><p>" . $row->user_discipline . "</p></td>" ;
	echo "<td><p>" . $row->user_qualifying_class . "</p></td>" ;
	$submitted_date = $row->user_submitted_date ;
	$submitted_date = date("d-m-Y", strtotime($submitted_date)) ;			   		
	echo "<td><p>" . $submitted_date . "</p></td>" ;
	echo "<td><p>" . addslashes($row->user_showground) . "</p></td>" ;
	echo "<td><p>" . $row->user_index . "</p></td>" ;

etc...

Although all the other fields are output correctly, the field ‘user_index’ just comes out blank. I can’t assign it to a variable and print that either.

The user_index field is the primary key for the table, and displays fine in phpmyadmin. It’s an auto incrementing field of type BigInt.

What am I missing? Is there another way to get this data?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer