I have [order:products:0:node:author:uid] as rules data selection token. In data selection mode that works perfectly, and adds the exact data right where I need it, but when I add that token into the database table, using Execute custom PHP code and the following this code, I get only a blank destination field with no value.
$nid = db_insert('mytable') ->fields(array( 'uid' => $uid, 'username' => $username, 'addr' => $address, 'destination' => "[order:products:0:node:author:uid]" )) ->execute();
All the other fields are filling correctly.
What could the problem be?