Firstly, the GUID is not the URL. It is a "globally unique identifier". WordPress uses the URL for this purpose, but accessing it is not a reliable way to get the URL for anything (this was a bad idea, but is kept this way for backwards compatibility).
It's not possible to query the image URL from the database directly. The full URL is not stored there. But ...
This is many years later and using 5.2, but I just noticed this in prepping to manually migrate content from another platform. Odd that the revision is created at the same exact time as the original post, even though no revision was actually made, but comes simply at the saving of the original post. Noticed this for pages and posts both.
Interestingly, I ...
Sorry to hear you are getting the "Error while sending QUERY packet' message. The best we can tell, this has to do with the max_allowed_packet_size. This should be able to be set via the php.ini file. You may find more information at this post regarding the issue.
I don't know of a plugin that allows you to do this out of the box, but as you are (/seem to be) comfortable with database manipulation, I've outline below how you can achieve what you want using custom coding.
You can run custom queries using the wpdb-class. There are a few posts on WPSE/SO that treat this. Once you've set those up, you can run them on, ...
You're missing your where statement. You need to tell wpdb which row it should be updating, otherwise you're looking to insert rather than update.
From the $wpdb::update Codex:
wpdb->update( string $table, array $data, array $where, array|string $format = null, array|string $where_format = null );
Add this to functions.php
and then make either of following changes in your code.
Because your jquery code is sending FirstNM to server (not FirstName).
Therefore in post_language() function, change this line
$FirstName = isset( $_POST['FirstName'] ) ? $_POST['FirstName'] : '';