I need to update the records of some tables, and I tried using the following command:

```
UPDATE auction a        
JOIN (SELECT bidding_price, user_id, auction_id FROM bid_account WHERE auction_id = a.auctionID ORDER BY bidpack_buy_date DESC LIMIT 1) ult_lance_a
SET a.auc_final_price=ult_lance_a.bidding_price, a.buy_user=ult_lance_a.user_id
WHERE a.auctionID=ult_lance_a.auction_id;

```

However I am getting the following error:

```
#1054 - Column 'a.auctionID' unknown in 'where clause'

```

what did I do wrong?

Here is the return of the command: `SELECT bidding_price, user_id, auction_id FROM bid_account WHERE auction_id = XXX ORDER BY bidpack_buy_date DESC LIMIT 1`

> 
> bidding\_price = 6.23  
> user\_id = 1720  
>  auction\_id = 1818
> 
> 
> 

In the `auction` table, there are the columns: 

> 
> auc\_final\_price  
>  bidding\_price  
> auctionID
> 
> 
> 

There are several records, but the records are the same for the columns: **auction\_id** and **auctionID**.

What I need is to just grab the LAST value entered in the `bid_account` table, and copy the values to the `auction` table.