You want a list of devices, that a user has been assigned? use the following example to get the details in php. (Based on the version of traccar you use, ensure to change table names)
//userId
$UID='3'
$sqlq=mysql_query("SELECT * FROM user_device JOIN device ON device.id=user_device.deviceId WHERE userId='$UID'");
// Iterate through the rows, printing deviceId seperated by |
while ($result =mysql_fetch_array($sqlq)){
echo result['deviceId'];
echo ' | ';
}
Hello Friend! How would it look for tables using tc_. Thanks
I would like to show the devices attached to a user, however, defining it by name or email and not by ID
You want a list of devices, that a user has been assigned? use the following example to get the details in php. (Based on the version of traccar you use, ensure to change table names)