if (strpos($BBT, 0, 3) != 'Sys')
Where does $BBT get its value from, here? You don't set it until later.
Also, you don't need to quote numeric array indexes. And you don't need to quote values for numeric fields in SQL.
And you could probably do all that with a single UPDATE statement, instead of one SELECT and who knows how many UPDATEs. You may know MySQL better than me, but in PostgreSQL I'd replace all that code with
UPDATE TOAWorkorders
SET
TechNum = substring(BBT from '^[^-]*'),
FirstName = substring(BBT from '^[^-]*-([^ ]*)'),
LastName = substring(BBT from '^[^-]*-[^ ]* ([^-]*)'),
Title = substring(BBT from '^[^-]*-[^-]*-([^-]*)')
WHERE
substring(BBT from 1 for 3) = 'Sys'
As ever, though, it would probably make more sense to put the data into the database properly in the first place.