wordpress - WPDataTables MySQL Insert Current User ID - Stack Overflow

I have a MySQL table like this:and I need insert get_current_user_id(); in the column PRODUCER ID when

I have a MySQL table like this:

and I need insert get_current_user_id(); in the column PRODUCER ID when the user adds a new entry but no way.

I tried with Transform Value but no way.

Also I tried with this snippet:

function filterColumnIDValue( $columnIDValue, $columnKey, $rowID, $columnID, $table_id){
// For specific table id - in your case 26
if ($table_id == 26) {
    // Filter for specific name of the column that contains unique values (origin header* of the column) - in your case 'JUPAS Code'
    if ($columnID == 'producer_id') {

            $columnIDValue = get_current_user_id();
        }
    }


return $columnIDValue;

Any help is welcome.

Many thanks.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744955939a4603192.html

相关推荐

  • wordpress - WPDataTables MySQL Insert Current User ID - Stack Overflow

    I have a MySQL table like this:and I need insert get_current_user_id(); in the column PRODUCER ID when

    1天前
    50

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信