Ok I guessed and came up with a horrible hack:
$alphaNum = 'abcdefghijklmnopqrstuvwxyz';
$alphaNum .= strtoupper($alphaNum) . '0123456789';
$evilSubstring = "concat(UUID(), concat('_', SUBSTRING(GROUP_CONCAT(SUBSTRING('$alphaNum', round(rand() * " . strlen($alphaNum) . ") + 1, 1) SEPARATOR ''), 1, 16)))";
$query = new MySQLQuery("UPDATE student SET uuid = (SELECT $evilSubstring FROM student_ethnicity_interest_assoc) WHERE uuid IS NULL OR uuid = '' LIMIT 1",
$dbAP->getDBConn()
);
Problem is, this will only work if student_ethnicity_interest_assoc has 16 or more rows ๐
How can I use any table (except for student, can't use that one or get an error) in the UPDATE's subselect that has 16 or more rows?
Phil