Hi Thai,

I think you're just joining waaaay too many tables! LOL


Matt


----- Original Message -----
From: "Thai Thanh Ha"
Sent: Sunday, November 16, 2003 8:10 PM
Subject: Please help DB Error: unknown error


> Hi all,
> I have a problem with my query on mySQL 4.0.
> DB Error: unknown error
> I don't know what is the problem. Please help me!!! Thanks in advance.
> Regards,
> Thai
> SELECT t.UserID, t.Country, t.Zip FROM tblUser t, tblUserProfile
> t1,tblUserProfile t2,tblUserProfile t3,tblUserProfile
t4,tblUserProfile
> t5,tblUserProfile t6,tblUserProfile t7,tblUserProfile
t8,tblUserProfile
> t9,tblUserProfile t10,tblUserProfile t11,tblUserProfile
t12,tblUserProfile
> t13,tblUserProfile t14,tblUserProfile t15,tblUserProfile
t16,tblUserProfile
> t17,tblUserProfile t18,tblUserProfile t19,tblUserProfile
t20,tblUserProfile
> t21,tblUserProfile t22,tblUserProfile t23,tblUserProfile
t24,tblUserProfile
> t25,tblUserProfile t26,tblUserProfile t27,tblUserProfile
t28,tblUserProfile
> t29,tblUserProfile t30,tblUserProfile t31,tblUserProfile
t32,tblUserProfile
> t33,tblUserProfile t34,tblUserProfile t35,tblUserProfile
t36,tblUserProfile
> t37,tblUserProfile t38,tblUserProfile t39,tblUserProfile
t40,tblUserProfile
> t41,tblUserProfile t42,tblUserProfile t43,tblUserProfile
t44,tblUserProfile
> t45,tblUserProfile t46,tblUserProfile t47,tblUserProfile
t48,tblUserProfile
> t49,tblUserProfile t50,tblUserProfile t51,tblUserProfile
t52,tblUserProfile
> t53,tblUserProfile t54,tblUserProfile t55,tblUserProfile
t56,tblUserProfile
> t57,tblUserProfile t58,tblUserProfile t59,tblUserProfile
t60,tblUserProfile
> t61,tblUserProfile t62,tblUserProfile t63,tblUserProfile
t64,tblUserProfile
> t65,tblUserProfile t66,tblUserProfile t67,tblUserProfile
t68,tblUserProfile
> t69,tblUserProfile t70,tblUserProfile t71,tblUserProfile
t72,tblUserProfile
> t73,tblUserProfile t74,tblUserProfile t75,tblUserProfile
t76,tblUserProfile
> t77,tblUserProfile t78,tblUserProfile t79,tblUserProfile
t80,tblUserProfile
> t81,tblUserProfile t82,tblUserProfile t83,tblUserProfile
t84,tblUserProfile
> t85,tblUserProfile t86,tblUserProfile t87,tblUserProfile
t88,tblUserProfile
> t89,tblUserProfile t90,tblUserProfile t91,tblUserProfile
t92,tblUserProfile
> t93,tblUserProfile t94,tblUserProfile t95,tblUserProfile
t96,tblUserProfile
> t97,tblUserProfile t98,tblUserProfile t99,tblUserProfile
t100,tblUserProfile
> t101,tblUserProfile t102,tblUserProfile t103,tblUserProfile
> t104,tblUserProfile t105,tblUserProfile t106,tblUserProfile
> t107,tblUserProfile t108,tblUserProfile t109,tblUserProfile
> t110,tblUserProfile t111,tblUserProfile t112,tblUserProfile
> t113,tblUserProfile t114,tblUserProfile t115,tblUserProfile
> t116,tblUserProfile t117,tblUserProfile t118,tblUserProfile
> t119,tblUserProfile t120,tblUserProfile t121,tblUserProfile
> t122,tblUserProfile t123,tblUserProfile t124,tblUserProfile
> t125,tblUserProfile t126,tblUserProfile t127,tblUserProfile
> t128,tblUserProfile t129,tblUserProfile t130,tblUserProfile
> t131,tblUserProfile t132,tblUserProfile t133,tblUserProfile
> t134,tblUserProfile t135,tblUserProfile t136,tblUserProfile
> t137,tblUserProfile t138,tblUserProfile t139,tblUserProfile
> t140,tblUserProfile t141,tblUserProfile t142,tblUserProfile
> t143,tblUserProfile t144,tblUserProfile t145,tblUserProfile
> t146,tblUserProfile t147,tblUserProfile t148,tblUserProfile
> t149,tblUserProfile t150,tblUserProfile t151,tblUserProfile
> t152,tblUserProfile t153,tblUserProfile t154,tblUserProfile
> t155,tblUserProfile t156,tblUserProfile t157,tblUserProfile
> t158,tblUserProfile t159,tblUserProfile t160,tblUserProfile t161,
> tblMatchProfile mp WHERE t.ShowProfile = 1 AND t.LoginHandle <>
> 'administrator' AND t.AccountType <> 2 AND t.AccountType <> 3 AND
t.Gender =
> 1 AND (Year(Now()) - Year(t.BirthDate)) BETWEEN 18 AND 80 AND t.UserID
=
> t1.UserID AND t1.FieldID = 78 AND t1.FieldValue = 8 AND
t1.UserID=t2.UserID
> AND t2.FieldID = 78 AND t2.FieldValue = 6 AND t1.UserID=t3.UserID AND
> t3.FieldID = 78 AND t3.FieldValue = 5 AND t1.UserID=t4.UserID AND
t4.FieldID
> = 78 AND t4.FieldValue = 3 AND t1.UserID=t5.UserID AND t5.FieldID = 78
AND
> t5.FieldValue = 4 AND t1.UserID=t6.UserID AND t6.FieldID = 78 AND
> t6.FieldValue = 7 AND t1.UserID=t7.UserID AND t7.FieldID = 78 AND
> t7.FieldValue = 1 AND t1.UserID=t8.UserID AND t8.FieldID = 78 AND
> t8.FieldValue = 9 AND t1.UserID=t9.UserID AND t9.FieldID = 78 AND
> t9.FieldValue = 2 AND t1.UserID=t10.UserID AND t10.FieldID = 79 AND
> t10.FieldValue = 3 AND t1.UserID=t11.UserID AND t11.FieldID = 79 AND
> t11.FieldValue = 1 AND t1.UserID=t12.UserID AND t12.FieldID = 79 AND
> t12.FieldValue = 2 AND t1.UserID=t13.UserID AND t13.FieldID = 79 AND
> t13.FieldValue = 5 AND t1.UserID=t14.UserID AND t14.FieldID = 79 AND
> t14.FieldValue = 6 AND t1.UserID=t15.UserID AND t15.FieldID = 79 AND
> t15.FieldValue = 4 AND t1.UserID=t16.UserID AND t16.FieldID = 131 AND
> t16.FieldValue = 4 AND t1.UserID=t17.UserID AND t17.FieldID = 131 AND
> t17.FieldValue = 2 AND t1.UserID=t18.UserID AND t18.FieldID = 131 AND
> t18.FieldValue = 1 AND t1.UserID=t19.UserID AND t19.FieldID = 131 AND
> t19.FieldValue = 3 AND t1.UserID=t20.UserID AND t20.FieldID = 137 AND
> t20.FieldValue = 12 AND t1.UserID=t21.UserID AND t21.FieldID = 137 AND
> t21.FieldValue = 4 AND t1.UserID=t22.UserID AND t22.FieldID = 137 AND
> t22.FieldValue = 5 AND t1.UserID=t23.UserID AND t23.FieldID = 137 AND
> t23.FieldValue = 9 AND t1.UserID=t24.UserID AND t24.FieldID = 137 AND
> t24.FieldValue = 6 AND t1.UserID=t25.UserID AND t25.FieldID = 137 AND
> t25.FieldValue = 7 AND t1.UserID=t26.UserID AND t26.FieldID = 137 AND
> t26.FieldValue = 3 AND t1.UserID=t27.UserID AND t27.FieldID = 137 AND
> t27.FieldValue = 14 AND t1.UserID=t28.UserID AND t28.FieldID = 137 AND
> t28.FieldValue = 13 AND t1.UserID=t29.UserID AND t29.FieldID = 137 AND
> t29.FieldValue = 1 AND t1.UserID=t30.UserID AND t30.FieldID = 137 AND
> t30.FieldValue = 8 AND t1.UserID=t31.UserID AND t31.FieldID = 137 AND
> t31.FieldValue = 11 AND t1.UserID=t32.UserID AND t32.FieldID = 137 AND
> t32.FieldValue = 10 AND t1.UserID=t33.UserID AND t33.FieldID = 137 AND
> t33.FieldValue = 2 AND t1.UserID=t34.UserID AND t34.FieldID = 56 AND
> t34.FieldValue = 1 AND t1.UserID=t35.UserID AND t35.FieldID = 134 AND
> t35.FieldValue = 4 AND t1.UserID=t36.UserID AND t36.FieldID = 134 AND
> t36.FieldValue = 5 AND t1.UserID=t37.UserID AND t37.FieldID = 134 AND
> t37.FieldValue = 1 AND t1.UserID=t38.UserID AND t38.FieldID = 109 AND
> t38.FieldValue = 4 AND t1.UserID=t39.UserID AND t39.FieldID = 109 AND
> t39.FieldValue = 5 AND t1.UserID=t40.UserID AND t40.FieldID = 109 AND
> t40.FieldValue = 6 AND t1.UserID=t41.UserID AND t41.FieldID = 109 AND
> t41.FieldValue = 1 AND t1.UserID=t42.UserID AND t42.FieldID = 109 AND
> t42.FieldValue = 3 AND t1.UserID=t43.UserID AND t43.FieldID = 109 AND
> t43.FieldValue = 8 AND t1.UserID=t44.UserID AND t44.FieldID = 109 AND
> t44.FieldValue = 2 AND t1.UserID=t45.UserID AND t45.FieldID = 109 AND
> t45.FieldValue = 7 AND t1.UserID=t46.UserID AND t46.FieldID = 122 AND
> t46.FieldValue = 1 AND t1.UserID=t47.UserID AND t47.FieldID = 122 AND
> t47.FieldValue = 3 AND t1.UserID=t48.UserID AND t48.FieldID = 122 AND
> t48.FieldValue = 2 AND t1.UserID=t49.UserID AND t49.FieldID = 86 AND
> t49.FieldValue = 9 AND t1.UserID=t50.UserID AND t50.FieldID = 86 AND
> t50.FieldValue = 1 AND t1.UserID=t51.UserID AND t51.FieldID = 86 AND
> t51.FieldValue = 4 AND t1.UserID=t52.UserID AND t52.FieldID = 86 AND
> t52.FieldValue = 11 AND t1.UserID=t53.UserID AND t53.FieldID = 86 AND
> t53.FieldValue = 5 AND t1.UserID=t54.UserID AND t54.FieldID = 86 AND
> t54.FieldValue = 12 AND t1.UserID=t55.UserID AND t55.FieldID = 86 AND
> t55.FieldValue = 7 AND t1.UserID=t56.UserID AND t56.FieldID = 86 AND
> t56.FieldValue = 10 AND t1.UserID=t57.UserID AND t57.FieldID = 86 AND
> t57.FieldValue = 13 AND t1.UserID=t58.UserID AND t58.FieldID = 86 AND
> t58.FieldValue = 15 AND t1.UserID=t59.UserID AND t59.FieldID = 86 AND
> t59.FieldValue = 3 AND t1.UserID=t60.UserID AND t60.FieldID = 86 AND
> t60.FieldValue = 8 AND t1.UserID=t61.UserID AND t61.FieldID = 86 AND
> t61.FieldValue = 6 AND t1.UserID=t62.UserID AND t62.FieldID = 86 AND
> t62.FieldValue = 2 AND t1.UserID=t63.UserID AND t63.FieldID = 86 AND
> t63.FieldValue = 14 AND t1.UserID=t64.UserID AND t64.FieldID = 63 AND
> t64.FieldValue = 1 AND t1.UserID=t65.UserID AND t65.FieldID = 63 AND
> t65.FieldValue = 2 AND t1.UserID=t66.UserID AND t66.FieldID = 63 AND
> t66.FieldValue = 4 AND t1.UserID=t67.UserID AND t67.FieldID = 63 AND
> t67.FieldValue = 5 AND t1.UserID=t68.UserID AND t68.FieldID = 63 AND
> t68.FieldValue = 3 AND t1.UserID=t69.UserID AND t69.FieldID = 119 AND
> t69.FieldValue = 12 AND t1.UserID=t70.UserID AND t70.FieldID = 119 AND
> t70.FieldValue = 19 AND t1.UserID=t71.UserID AND t71.FieldID = 119 AND
> t71.FieldValue = 1 AND t1.UserID=t72.UserID AND t72.FieldID = 119 AND
> t72.FieldValue = 8 AND t1.UserID=t73.UserID AND t73.FieldID = 119 AND
> t73.FieldValue = 5 AND t1.UserID=t74.UserID AND t74.FieldID = 119 AND
> t74.FieldValue = 21 AND t1.UserID=t75.UserID AND t75.FieldID = 119 AND
> t75.FieldValue = 10 AND t1.UserID=t76.UserID AND t76.FieldID = 119 AND
> t76.FieldValue = 14 AND t1.UserID=t77.UserID AND t77.FieldID = 119 AND
> t77.FieldValue = 11 AND t1.UserID=t78.UserID AND t78.FieldID = 119 AND
> t78.FieldValue = 17 AND t1.UserID=t79.UserID AND t79.FieldID = 119 AND
> t79.FieldValue = 9 AND t1.UserID=t80.UserID AND t80.FieldID = 119 AND
> t80.FieldValue = 16 AND t1.UserID=t81.UserID AND t81.FieldID = 119 AND
> t81.FieldValue = 3 AND t1.UserID=t82.UserID AND t82.FieldID = 119 AND
> t82.FieldValue = 18 AND t1.UserID=t83.UserID AND t83.FieldID = 119 AND
> t83.FieldValue = 2 AND t1.UserID=t84.UserID AND t84.FieldID = 119 AND
> t84.FieldValue = 15 AND t1.UserID=t85.UserID AND t85.FieldID = 119 AND
> t85.FieldValue = 6 AND t1.UserID=t86.UserID AND t86.FieldID = 119 AND
> t86.FieldValue = 4 AND t1.UserID=t87.UserID AND t87.FieldID = 119 AND
> t87.FieldValue = 13 AND t1.UserID=t88.UserID AND t88.FieldID = 119 AND
> t88.FieldValue = 7 AND t1.UserID=t89.UserID AND t89.FieldID = 119 AND
> t89.FieldValue = 20 AND t1.UserID=t90.UserID AND t90.FieldID = 120 AND
> t90.FieldValue = 1 AND t1.UserID=t91.UserID AND t91.FieldID = 120 AND
> t91.FieldValue = 4 AND t1.UserID=t92.UserID AND t92.FieldID = 120 AND
> t92.FieldValue = 2 AND t1.UserID=t93.UserID AND t93.FieldID = 120 AND
> t93.FieldValue = 3 AND t1.UserID=t94.UserID AND t94.FieldID = 133 AND
> t94.FieldValue = 2 AND t1.UserID=t95.UserID AND t95.FieldID = 133 AND
> t95.FieldValue = 4 AND t1.UserID=t96.UserID AND t96.FieldID = 133 AND
> t96.FieldValue = 3 AND t1.UserID=t97.UserID AND t97.FieldID = 133 AND
> t97.FieldValue = 1 AND t1.UserID=t98.UserID AND t98.FieldID = 133 AND
> t98.FieldValue = 5 AND t1.UserID=t99.UserID AND t99.FieldID = 96 AND
> t99.FieldValue = 7 AND t1.UserID=t100.UserID AND t100.FieldID = 96 AND
> t100.FieldValue = 1 AND t1.UserID=t101.UserID AND t101.FieldID = 96
AND
> t101.FieldValue = 4 AND t1.UserID=t102.UserID AND t102.FieldID = 96
AND
> t102.FieldValue = 6 AND t1.UserID=t103.UserID AND t103.FieldID = 96
AND
> t103.FieldValue = 10 AND t1.UserID=t104.UserID AND t104.FieldID = 96
AND
> t104.FieldValue = 5 AND t1.UserID=t105.UserID AND t105.FieldID = 96
AND
> t105.FieldValue = 8 AND t1.UserID=t106.UserID AND t106.FieldID = 96
AND
> t106.FieldValue = 2 AND t1.UserID=t107.UserID AND t107.FieldID = 96
AND
> t107.FieldValue = 9 AND t1.UserID=t108.UserID AND t108.FieldID = 96
AND
> t108.FieldValue = 3 AND t1.UserID=t109.UserID AND t109.FieldID = 106
AND
> t109.FieldValue = 1 AND t1.UserID=t110.UserID AND t110.FieldID = 106
AND
> t110.FieldValue = 2 AND t1.UserID=t111.UserID AND t111.FieldID = 106
AND
> t111.FieldValue = 3 AND t1.UserID=t112.UserID AND t112.FieldID = 106
AND
> t112.FieldValue = 4 AND t1.UserID=t113.UserID AND t113.FieldID = 106
AND
> t113.FieldValue = 5 AND t1.UserID=t114.UserID AND t114.FieldID = 106
AND
> t114.FieldValue = 6 AND t1.UserID=t115.UserID AND t115.FieldID = 106
AND
> t115.FieldValue = 7 AND t1.UserID=t116.UserID AND t116.FieldID = 106
AND
> t116.FieldValue = 8 AND t1.UserID=t117.UserID AND t117.FieldID = 130
AND
> t117.FieldValue = 4 AND t1.UserID=t118.UserID AND t118.FieldID = 130
AND
> t118.FieldValue = 2 AND t1.UserID=t119.UserID AND t119.FieldID = 130
AND
> t119.FieldValue = 1 AND t1.UserID=t120.UserID AND t120.FieldID = 130
AND
> t120.FieldValue = 3 AND t1.UserID=t121.UserID AND t121.FieldID = 130
AND
> t121.FieldValue = 5 AND t1.UserID=t122.UserID AND t122.FieldID = 139
AND
> t122.FieldValue = 6 AND t1.UserID=t123.UserID AND t123.FieldID = 139
AND
> t123.FieldValue = 2 AND t1.UserID=t124.UserID AND t124.FieldID = 139
AND
> t124.FieldValue = 4 AND t1.UserID=t125.UserID AND t125.FieldID = 139
AND
> t125.FieldValue = 5 AND t1.UserID=t126.UserID AND t126.FieldID = 139
AND
> t126.FieldValue = 7 AND t1.UserID=t127.UserID AND t127.FieldID = 139
AND
> t127.FieldValue = 8 AND t1.UserID=t128.UserID AND t128.FieldID = 139
AND
> t128.FieldValue = 1 AND t1.UserID=t129.UserID AND t129.FieldID = 139
AND
> t129.FieldValue = 3 AND t1.UserID=t130.UserID AND t130.FieldID = 135
AND
> t130.FieldValue = 7 AND t1.UserID=t131.UserID AND t131.FieldID = 135
AND
> t131.FieldValue = 12 AND t1.UserID=t132.UserID AND t132.FieldID = 135
AND
> t132.FieldValue = 6 AND t1.UserID=t133.UserID AND t133.FieldID = 135
AND
> t133.FieldValue = 9 AND t1.UserID=t134.UserID AND t134.FieldID = 135
AND
> t134.FieldValue = 5 AND t1.UserID=t135.UserID AND t135.FieldID = 135
AND
> t135.FieldValue = 8 AND t1.UserID=t136.UserID AND t136.FieldID = 135
AND
> t136.FieldValue = 13 AND t1.UserID=t137.UserID AND t137.FieldID = 135
AND
> t137.FieldValue = 3 AND t1.UserID=t138.UserID AND t138.FieldID = 135
AND
> t138.FieldValue = 4 AND t1.UserID=t139.UserID AND t139.FieldID = 135
AND
> t139.FieldValue = 1 AND t1.UserID=t140.UserID AND t140.FieldID = 135
AND
> t140.FieldValue = 11 AND t1.UserID=t141.UserID AND t141.FieldID = 135
AND
> t141.FieldValue = 10 AND t1.UserID=t142.UserID AND t142.FieldID = 135
AND
> t142.FieldValue = 2 AND t1.UserID=t143.UserID AND t143.FieldID = 128
AND
> t143.FieldValue = 8 AND t1.UserID=t144.UserID AND t144.FieldID = 128
AND
> t144.FieldValue = 7 AND t1.UserID=t145.UserID AND t145.FieldID = 128
AND
> t145.FieldValue = 3 AND t1.UserID=t146.UserID AND t146.FieldID = 128
AND
> t146.FieldValue = 4 AND t1.UserID=t147.UserID AND t147.FieldID = 128
AND
> t147.FieldValue = 9 AND t1.UserID=t148.UserID AND t148.FieldID = 128
AND
> t148.FieldValue = 1 AND t1.UserID=t149.UserID AND t149.FieldID = 128
AND
> t149.FieldValue = 6 AND t1.UserID=t150.UserID AND t150.FieldID = 128
AND
> t150.FieldValue = 5 AND t1.UserID=t151.UserID AND t151.FieldID = 128
AND
> t151.FieldValue = 2 AND t1.UserID=t152.UserID AND t152.FieldID = 129
AND
> t152.FieldValue = 10 AND t1.UserID=t153.UserID AND t153.FieldID = 129
AND
> t153.FieldValue = 5 AND t1.UserID=t154.UserID AND t154.FieldID = 129
AND
> t154.FieldValue = 8 AND t1.UserID=t155.UserID AND t155.FieldID = 129
AND
> t155.FieldValue = 7 AND t1.UserID=t156.UserID AND t156.FieldID = 129
AND
> t156.FieldValue = 9 AND t1.UserID=t157.UserID AND t157.FieldID = 129
AND
> t157.FieldValue = 3 AND t1.UserID=t158.UserID AND t158.FieldID = 129
AND
> t158.FieldValue = 1 AND t1.UserID=t159.UserID AND t159.FieldID = 129
AND
> t159.FieldValue = 6 AND t1.UserID=t160.UserID AND t160.FieldID = 129
AND
> t160.FieldValue = 4 AND t1.UserID=t161.UserID AND t161.FieldID = 129
AND
> t161.FieldValue = 2 AND mp.UserID = t.UserID AND mp.FieldID = 1 AND
> mp.FieldValue = 0


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to