致命错误:未捕获错误:调用未定义函数mysql_query()的布局不正确

时间:2019-03-01 21:16:42

标签: sql

我正在在线上学习教程,但我认为它有点过时或者他们正在使用其他程序,所以我只需要帮助将下面的SQL代码转换为PHP可以理解的版本即可。

SELECT qsu.UserFirstName + ' ' + qsu.UserLastName AS "FullName",
    STUFF((SELECT '/' + r.RoleName FROM QuickbaseSystemUsers r on r.UserID = qsu.UserID FOR XML PATH('')), 1, 2, '') as "Roles",
    NumberOfEditTotal << [however you calced this]
FROM vw_QuickbaseAudit v
    INNER JOIN [staging].[QuickbaseSystemUsers] qsu ON v.[user] = qsu.UserId 
WHERE Date_Modified >= @StartDate AND Date_Modified < DATEADD(dd, 1, @EndDate) 
GROUP BY qsu.UserFirstName + ' ' + qsu.UserLastName, 
    STUFF((SELECT '/' + r.RoleName FROM QuickbaseSystemUsers r on r.UserID = qsu.UserID FOR XML PATH('')), 1, 2, '')
ORDER BY RoleName, NumberOfEditTotal DESC;

0 个答案:

没有答案