且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

sql语法问题和/或代码问题? “索引在数组的边界之外."

更新时间:2021-07-05 05:40:52

始终存储张贴者,即使隔离墙的所有者自己做了.这将为您简化sql.

Always store who posted it, even if the owner of the wall did it herself. This will simplify the sql for you.

SELECT wp.WallPostings, p.PicturePath 
FROM WallPosting wp 
INNER JOIN [User] u ON u.UserID = wp.PostedByUserID 
INNER JOIN Pictures p ON p.UserID = u.UserID 
WHERE wp.UserID=" + userId + " 
ORDER BY idWallPosting DESC

为什么图片与图片的比例是1比1?

Why is pictures in a separate table if it is 1 to 1?