It's now officially hurting my head as it's looks right.
There 8 sessions all on different dates
whatever session id I filter on it makes all badges that date.
I've joined signups and badges
fsd.timestart is different in the database for all sessions
UPDATE mdl_badge_issued bi
JOIN mdl_user u ON bi.userid = u.id AND u.deleted = 0
JOIN mdl_facetoface_signups ffs ON u.id = bi.userid
JOIN mdl_badge b ON bi.badgeid = b.id
JOIN mdl_course c ON c.id = b.courseid
JOIN mdl_facetoface f ON f.course = c.id
JOIN mdl_facetoface_sessions fs ON fs.facetoface = f.id
JOIN mdl_facetoface_sessions_dates fsd ON fsd.sessionid = fs.id
SET bi.dateissued = fsd.timestart
WHERE bi.badgeid = 72
AND fs.id = 39
I'm assuming this isn't possible.
I asked on Stackoverflow at the same time and had no responses at all.
I've since tried where fs.id and not used the badge id to see if a can do one session at a time, the date still changes all badge sessions to the same date