salix/db/routines/vn/procedures/deviceProductionUser_getWor...

15 lines
462 B
MySQL
Raw Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`deviceProductionUser_getWorker`(vAndroid_id VARCHAR(64))
BEGIN
/**
* Selecciona si hay registrado un device con un android_id
*
* @param vAndroid_id el número android_id del dispositivo
*/
SELECT account.user_getNameFromId(dpu.userFk)
FROM deviceProductionUser dpu
JOIN deviceProduction dp ON dpu.deviceProductionFk = dp.id
WHERE dp.android_id = vAndroid_id;
END$$
DELIMITER ;