this

MySQL returned error




Error Description :
Error No : 1064
Description : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,act' at line 1

SQL Query
SELECT COUNT(`book`.id) AS CNT FROM `book` WHERE id!=0 AND book.id<>0 and book.active='yes' and city_id!='' and book.id in(0,4178,858,6545,6840,6763,6764,6765,3090,6144,6753,6761,6762,6759,6760,6840,6424,6752,6719,3609,6742,6391,6746,6744,6749,6745,6911,6910,6914,6913,3926,6422,6758,6421,6935,6424,6425,6932,6938,6925,6926,6912,6427,6423,6763,6764,6988,6934,6937,6390,6391,863,858,6191,6527,6146,6152,6377,6517,6151,6144,6388,673,653,275,6607,6191,6381,4614,7018,323,394,8307,8584,6270,6531,6529,7610,7870,7697,6652,6216,5691,6528,7695,7868,7696,3442,1704,7693,6654,8719,7189,8586,7546,4302,8897,8618,3515,8682,1770,2783,8896,6197,8728,7188,6023,1765,7187,7568,7567,7569,7570,7762,391,6066,384,377,6082,382,374,544,573,528,539,548,525,549,272,6381,6066,393,386,6082,6742,6796,6204,6220,6533,4146,372,375,673,6751,6744,6749,6745,365,6270,387,378,376,389,6076,381,368,388,388,391,6066,384,386,6082,6082,390,6751,6751,863,3882,6197,1768,6519,6523,5864,1766,6532,2720,6498,6507,4300,6222,6497,6515,1767,2795,6200,4301,4936,6503,4305,6371,6529,4301,2720,4293,2780,2785,6504,2783,2778,2781,2779,2782,2784,2786,4290,4298,2787,6530,4300,4282,1766,1769,2818,2824,1764,1767,6263,222,3071,2789,6489,6531,4286,6354,3070,2823,1245,6198,6201,6199,6200,1767,1766,6354,3073,7137,511,7299,7300,7134,1767,2808,2803,3888,3885,2791,2820,2801,2802,2805,2807,2806,2794,6546,1769,2826,2827,2828,6514,1245,5576,1351,2869,834,3884,3882,7160,6515,6456,3891,3893,3896,3892,3890,7567,3897,6493,6271,6507,2720,7300,2677,2995,510,6523,6371,6743,3029,7548,6218,6199,6373,6223,6527,6201,810,2522,6354,6546,3070,7751,6689,3073,3071,1769,7599,6746,7870,6749,2018,7753,6751,3889,3882,6599,374,810,379,391,387,6066,384,378,382,375,394,376,6082,1266,7215,7054,3898,1250,4178,5647,7752,6354,1766,7598,7600,7676,7137,7631,6809,4445,4827,4512,6354,3070,3073,3071,6689,550,7677,7168,7167,7170,7165,7163,7173,7164,7959,7922,7054,6985,7752,1767,1765,1769,1766,6168,7986,2522,1741,6354,8233,8232,6880,3071,3521,2389,3070,8272,2822,2823,2826,7238,8245,2728,2893,8294,7787,8432,344,8316,8220,8313,6509,6508,8307,7238,1767,6197,8520,8514,8315,8318,1769,5909,6520,8233,8246,8334,6521,8331,6513,6514,6507,6515,8358,4639,4535,5576,2869,834,1351,1741,8481,6505,6261,3913,3085,8698,8681,3850,5647,8682,6534,6537,4178,6535,8730,8520,8333,8649,601,2170,2390,3610,8342,6641,8596,8691,8814,8817,8815,8520,5996,8142,567,7634,7635,5551,8617,8719,2520,8591,8717,2522,8681,2522,8681,8780,8944,8817,7881,9041,8683,2253,4535,8826,8682,8945,6168,223,9030,4639,311,8358,8698,4834,2992,8175,6691,8727,2925,8232,8551,8681,3913,3172,9390,1232,3165,4178,5068,9736,10297,9390,9951,10364,10238,6971,9334,3646,10353,6209,9934,8514,3731,10164,9084,223,4639,6250,10527,7554,7592,4218,8555,6712,5567,8290,10505,10656,3646,10547,10531,7910,7756,10339,9669,10364,9670,1257,4178,446,5376,222,9543,10865,10654,10877,6611,10296,10786,8306,7636,1537,418,7096,7268,7089,7121,7125,7084,7288,6751,6517,6076,6377,6742,6743,382,7278,7278,7287,7287,6151,6604,6742,388,6918,1557,6745,379,7123,7123,7123,3889,7264,7971,7971,3890,7107,7647,7245,6540,6970,7282,217,7100,8055,7649,1666,8641,8050,8047,9229,7304,9797,7124,7099,7150,7150,7150,7105,7104,9796,7155,9794,6396,1084,1086,1085,1604,5495,714,5495,2729,1609,987,7132,5185,6533,990,4346,7020,7636,6589,7636,2018,7580,4563,7972,7973,6201,3380,6098,8098,8093,7273,8302,7639,2006,6843,6445,3521,7105,8199,8047,7895,8413,8514,9055,9132,3647,9206,8475,3169,9195,4796,8224,9900,9935,9879,9630,9945,2736,10547,10026,1993,10765,7976,10881,8053,7152,9134,9204,11798,11609,10466,11410,6373,979,388,6656,4079,6371,6372,6740,6512,8241,7751,8245,1029,8337,6538,8331,3889,6493,8323,3890,7840,7879,7878,7897,3913,6264,659,8319,6193,8323,5420,6520,8317,8341,6372,9030,713,4299,4292,1371,5484,4297,6103,6519,6518,6103,6518,8584,8585,9552,7870,7546,1770,9300,1765,3702,8222,7303,2992,4769,374,1664,6719,7437,858,857,397,1537,5910,376,382,379,6743,6144,4614,6751,388,6082,380,4302,379,391,376,377,382,385,390,3090,6742,3728,5371,381,386,6076,385,377,394,386,8168,387,376,8165,393,384,375,388,6270,6066,372,379,390,3893,7199,6082,368,3879,7238,409,6749,3036,365,8168,1557,392,389,8788,8785,8786,4639,8882,223,7923,4395,8878,2989,8787,6103,6746,7871,367,2117,8877,6493,3428,8881,7239,8982,5770,8983,6204,7175,8358,6785,6144,6538,8856,6386,4714,386,8789,8880,8858,8855,9192,378,7300,6491,8651,3889,3896,3883,3885,4302,7214,3888,979,810,1165,8824,8857,8358,6359,5386,5297,9149,7599,7808,1266,1411,1685,4289,6527,6521,4293,6218,3891,3890,4294,3895,6532,3892,7693,3894,3882,8271,3897,8272,3893,3881,3884,3888,3883,8274,8273,8981,8982,546,554,6537,8980,6381,3885,8879,2701,6377,9698,9713,9709,9708,9710,9711,1766,9718,9435,8241,8246,9593,9592,8310,9684,8598,8249,9427,8243,9425,8339,8242,8597,8245,8247,8248,8318,8317,9428,8319,9435,8319,9424,8320,9436,9426,8328,9591,4286,6199,9891,7244,7078,7108,7101,7085,7276,1086,7279,7574,7987,7986,6742,6749,7985,5454,7745,7741,6529,8365,8237,8684,8818,8583,8753,3413,3830,6197,3989,4580,275,4860,1165,4234,3860,5535,726,393,2882,2160,4730,6154,1537,4131,5996,6545,1137,543,397,6138,6040,6559,4023,725,6686,6679,6197,7879,7840,7143,7878,8220,5764,7903,8183,3784,3263,215,8222,7998,7638,5995,3761,2467,419,6981,1506,501,2706,8306,3059,971,1215,4178,1257,7833,3134,3368,8542,8616,8488,7840,7879,7878,4259,8529,8306,5143,466,252,6204,6539,7631,7870,7582,4136,3542,8434,4788,7896,8611,8615,3413,2261,7641,7837,7615,7903,7834,9144,8983,6713,9300,8842,9130,7910,9547,6023,10119,9220,9807,10548,10244,9752,9770,10523,10526,9924,10300,36,10688,11733,11346,10569,10892,10734,9811,10674,11325,9831,11380,11101,10687,11749,11215,11311,2071,7743,6742,6753,6381,7386,7386,7877,8917,8917,8531,3890,3892,2594,7987,537,550,8272,3888,3883,3882,526,537,550,543,540,539,7164,8729,3897,7172,3891,8883,4302,7166,7167,7171,7165,7174,6376,6517,6989,6743,6746,4614,7610,7103,11085,6768,11082,8582,6199,6198,6200,9632,9631,11297,10445,3898,10981,6201,10948,9150,10947,8346,8345,7311,11429,9794,8228,1704,9076,4804,8771,7697,3515,7694,1666,7608,3442,7696,7646,7150,7868,6963,6174,378,378,6388,6880,6880,6386,6386,6388,6760,6988,6082,6749,379,379,379,379,3222,3222,3222,3222,3222,3222,3222,3222,7155,6270,8203,7070,6396,7253,7252,7254,7083,8580,6381,8771,8832,3604,7252,6076,7032,8665,397,1385,857,8361,858,6823,4178,4340,5763,6703,752,3457,4023,6809,585,3908,5764,6740,6104,3913,4950,3474,504,7238,3715,1016,3368,3933,7937,7903,8220,4337,4901,4901,6821,8306,8306,8306,6151,8228,6521,6521,6521,3612,7614,7614,7705,7199,7195,9165,7162,7198,653,3875,7196,7191,7194,8988,6385,8984,9592,2520,7199,6925,7200,9087,6926,6931,3277,7190,6386,8986,9172,9885,7199,9177,8986,10044,9175,7196,10045,6931,7192,6936,6935,7671,7671,3889,8771,8771,8047,9206,9055,9204,8832,8832,7106,8232,6218,8473,8055,8055,8055,8055,8055,8055,377,381,6270,372,545,374,374,544,531,551,2520,3890,3890,3891,3891,8877,385,387,391,6391,3884,6493,3896,3895,3888,3894,3882,3888,3883,7124,2992,1988,8580,6740,6740,9139,8743,8743,8415,8415,8050,7288,7288,7111,7111,7115,7115,7664,9401,8771,7113,7246,7117,7263,7263,7505,7505,9877,8460,9873,9874,9874,9856,9856,9821,9821,11515,11525,11525,9398,6100,2317,6103,4037,6632,5193,217,4901,8031,1439,8290,322,7961,7861,8541,5904,7592,2997,2873,7904,3926,8164,8164,8164,6191,6191,4432,9038,858,3913,800,5647,8434,5732,9373,9549,7175,9277,9654,9335,9677,8688,8904,9197,9635,6337,834,2869,9636,9295,9149,9764,9811,107,1351,9651,9933,9680,9182,4769,9111,6386,8310,9409,9115,9409,9115,9409,9115,9112,8700,9112,8700,9112,8700,9112,8700,9112,8700,6929,7971,7576,8981,6926,6933,6650,8879,6742,7703,6744,6936,8700,7104,7646,397,6144,7150,7297,9174,6743,7099,8980,7122,8982,2856,6749,6349,6751,1730,8983,546,9500,6935,2992,5996,3888,8729,391,7548,3890,3885,1492,7160,6749,3889,7987,7986,1462,377,6076,8968,1462,8968,3890,372,6593,387,7576,6593,7576,6593,7576,7985,8271,314,8389,6174,6175,9030,1726,6493,8272,3891,3883,1726,3897,378,8878,8877,7576,392,7599,7576,4473,389,3894,3884,3881,2992,368,2145,376,6076,6361,915,6361,6066,1108,1167,546,8267,8788,8223,390,8223,3892,9537,9547,8789,5956,4979,5956,9536,9536,6843,9266,6843,9266,8858,365,6204,6593,365,6593,8878,9616,6743,6751,8390,8981,8983,9879,6746,8879,6746,8879,8980,7196,8167,9950,9692,8230,9692,8230,9525,7588,6745,6386,6745,6386,6743,9890,10167,6916,7610,6745,10263,9829,8983,8981,6743,3883,10222,1730,9165,9601,3898,9534,8982,6742,10167,6744,6746,6749,979,6359,7599,6768,5386,8879,9217,390,8241,8334,10334,10336,10335,9920,10238,10194,10200,10263,8877,382,8330,8320,8339,8337,9891,9908,9113,10202,9111,8242,8873,8872,8649,10152,9112,9120,9431,8318,9114,9119,8326,8310,8247,8313,8309,8308,9633,5691,1685,5386,6195,1765,10546,10545,7845,9633,9903,9905,6533,2605,5386,1769,8824,10546,9909,9137,8824,1685,5784,10522,9137,9149,1770,8917,1771,1765,10925,8824,8489,7869,1967,9031,5770,4714,10645,10646,10750,11167,10925,10922,9985,10466,8592,5810,390,8784,8788,8881,10613,11051,11248,11247,8882,7134,7877,2071,9303,9350,2506,11239,4714,11022,375,8787,372,376,368,381,6066,387,8858,385,380,393,375,391,386,6082,378,8784,394,6270,8880,392,365,8878,8786,8789,10896,11088,11327,11329,11182,11231,11249,6375,11178,6271,6076,379,6537,11173,11176,11175,5332,1411,810,10521,11183,10827,1266,6535,11229,11174,11186,11252,11185,10921,11238,11519,11295,11296,6505,11318,11294,11239,11254,11301,11251,11585,11571,4923,10731,6600,11085,11665,4520,11666,11667,11085,8175,10823,10278,7922,6354,6503,6523,11425,5383,11429,11085,8272,3883,10167,6742,6744,6751,6745,8982,8983,6749,8879,8980,8981,6746,10045,10222,6386,6743,6914,1662,554,10272,9189,9076,390,9518,9520,9517,9521,9522,8985,9515,10429,6854,7703,8986,8987,10427,10647,9144,10729,10763,10532,10763,10126,9580,10532,7238,9192,9191,9217,9231,9143,10957,9144,1016,1016,10593,10599,10600,8530,8529,10161,10161,6743) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC