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,8222,7579,7837,4079,1210,7834,4639,7835,7836,6740,7143,4087,8358,7238,223,8220,8517,3282,7989,8306,8547,8480,2117,8610,435,8610,3014,8629,8214,5143,4218,7923,3850,8842,1207,8905,8912,6599,1127,8916,9000,665,1345,8578,8780,9046,9130,9195,9017,1461,9072,3062,4625,8933,8706,5154,9200,9242,984,9254,7907,5536,9300,3761,8495,9322,9332,9333,9334,5732,9308,9289,9291,8103,9337,1057,179,8150,3595,2135,9456,3059,9419,9290,8688,7803,9196,9347,9541,8543,8306,9552,8306,9353,8306,7581,8306,6117,9607,9603,9604,7143,6857,1890,9641,9634,9654,9643,9668,9642,9644,2360,9377,4240,9680,107,9616,9761,9234,8805,9648,4219,9676,9769,9766,9780,7856,772,9798,3844,4800,3303,2299,9116,2294,5515,5765,3590,2398,9258,1416,9913,9916,9938,9942,8913,9635,5841,780,9961,3844,9543,9945,129,9471,3159,3788,444,5692,1834,8870,8844,972,10047,6848,1727,1822,360,10056,734,7615,10104,6681,5812,7016,2674,6827,1181,10128,10129,9086,3181,10141,10149,3437,10119,10120,8925,10048,10061,967,9472,1522,9963,1906,10093,220,4126,9116,5821,2743,1485,1000,152,10229,10242,10241,180,148,958,1461,2135,2192,3585,2299,10131,10282,10284,8884,4947,7019,10273,2687,2642,1826,3561,10283,9936,2421,4656,4566,4972,2571,10342,10338,10246,9348,115,10300,10380,10373,10209,10358,9050,4527,10374,10373,10440,5743,6171,10469,4168,10467,10476,10416,10479,9374,9638,10042,6267,9220,3608,5877,3035,4986,8851,9454,8837,10523,10114,10244,10527,10247,5551,8902,10394,8800,10549,10541,10537,10548,10543,322,10514,8514,1954,10021,4385,9193,1057,7550,6691,162,8901,10671,10649,9904,4767,4696,10665,7017,7582,10674,10569,5729,10745,1954,10747,10787,10798,4023,10780,10814,10737,10663,3715,10784,10836,10688,4082,10135,10782,6713,252,10878,10699,10870,5373,10935,10894,7016,10910,10892,10934,1350,4136,1521,10938,10918,10966,5142,10895,10893,10656,7140,10397,606,10782,8900,10988,5379,6828,2192,10233,7614,1532,9834,6643,10708,11028,10709,7064,10710,9081,10285,3054,7021,2270,2271,1131,10221,2672,10344,3825,10345,10513,11084,10320,123,11090,10661,10662,11105,10398,11104,7143,10990,11094,6838,239,10899,10778,9872,10673,11104,2642,7016,7710,9254,3391,9768,9254,9270,1277,7016,955,6861,1441,2654,1055,2707,1160,1159,30,243,11121,10376,10917,1160,30,11123,11127,11128,5631,11132,8687,11126,10765,11089,10454,5875,743,7758,10094,11135,11142,11136,10964,6849,2912,4982,10857,2698,10971,10733,9453,6852,10343,7864,780,3964,8835,3657,2639,3542,5379,4219,7855,1277,1042,8919,11166,3775,10148,10375,3778,5678,4665,9928,10130,5305,11180,10719,1835,11195,10473,6696,3787,6853,4362,9105,1176,2671,1313,6661,4616,2919,11219,11222,11217,10734,11230,11201,3100,10819,11237,10657,2709,10434,4233,1119,11220,8535,11199,9234,11200,4209,5487,9096,3457,2446,10861,8031,5545,6731,11198,11235,10528,6731,11084,9722,11288,11287,11268,1209,11304,11302,11272,4056,6862,6779,11324,11325,8134,9343,5046,36,1698,2590,748,5903,11349,3936,11041,11353,3376,3195,3139,4028,4648,8802,11361,2592,2919,2685,11359,11360,2873,4536,11389,11351,11374,3482,2655,7036,3396,9402,6866,11409,10940,11417,11266,11424,11423,10715,5013,11314,11266,9811,10062,10146,24,4875,10714,11142,5252,11443,8010,10530,10714,11442,6730,9922,11438,1049,11433,1050,9221,739,11473,11437,10288,10234,11480,11456,11450,11388,11491,11494,4329,11455,9615,11488,6692,11381,11498,11489,11347,11344,11468,768,1576,11476,11371,11477,11382,9750,4648,11102,4882,11416,2555,986,9809,9807,9808,141,986,11290,3368,11492,152,10842,2477,7709,8224,3523,11599,11042,10912,11595,11598,11613,3041,2456,122,3500,3540,5328,11621,1299,6693,11373,11597,11593,11619,11518,11600,11606,11655,11620,11648,11436,10368,11661,11647,11670,11435,11451,4233,11479,11646,11678,11594,11303,11446,61,11523,4432,11663,11691,11644,10002,11362,1113,11690,10685,11698,11703,779,9965,11719,11672,11669,11724,11680,11714,11126,11446,11702,11705,11738,11737,11725,6986,3401,925,8707,8520,9222,4061,11385,2491,7760,8104,9317,5047,11658,4099,11170,9068,8483,9070,6337,4849,11764,11765,11673,9532,9987,7896,8146,2454,11379,2419,1298,9531,258,11657,5553,6902,258,11770,11772,3714,218,11752,10635,9018,11786,11660,11807,11812,9511,7362,11816,6901,11787,11785,11282,9036,10967,5629,11330,11659,9986,11681,11716,9228,11285,11827,11819,10764,4696,11821,11820,11842,11845,11829,11010,11846,11826,11869,11831,11872,11662,10956,11851,9917,11822,11699,11847,9964,9967,10877,8284,11832,11871,5885,11870,11849,11873,11900,10743,2921,9211,9166,9642,9643,9644,11921,11828,9641,4100,4513,6595,1872,6102,566,7138,2590,1812,5544,7833,4131,2658,4983,7156,6635,2261,7016,8031,4220,2393,617,8442,7250,7250,7840,2761,7064,675,1487,3392,3803,5094,7069,8902,8900,8514,3957,4872,9036,4349,7998,7654,8175,4510,3715,9220,9214,7985,2393,9278,9279,9049,6154,9258,9258,7563,7563,9406,9377,9444,9444,9527,9363,5545,7655,7655,7655,6774,6774,9614,6686,9730,9258,9656,4800,4405,1917,3698,3241,4099,1298,6832,2458,3595,1559,6779,5088,1498,2261,6248,3550,1257,1215,6560,3702,6588,3037,6732,252,3625,2337,6635,1521,5142,3327,2954,6793,5373,3542,4136,6104,5379,1349,6713,7016,4023,6684,5817,435,766,5339,3159,3437,971,6069,4460,4005,4258,4050,7019,7156,7138,6365,4878,1762,3080,1080,4125,249,752,322,1121,7230,7304,5460,7005,4178,4455,5020,1536,7126,7050,7238,4886,7761,1253,608,1698,4460,5545,7038,7840,6693,7354,7879,5236,2915,3725,7829,1038,7839,2705,7878,7760,7783,1371,6842,4652,7858,7640,361,2635,6663,7920,8031,8089,8094,7992,5349,4199,2387,5070,8095,3701,2294,3162,4218,2590,358,5247,8222,5885,5088,6478,4710,228,5764,2882,4766,5915,8611,1830,4217,2863,6001,7787,6941,6366,8442,4144,8829,6314,6686,2657,8548,4209,5362,6971,8555,6712,8809,2381,8938,9027,4082,9038,8837,7614,1318,8918,8687,36,1127,8910,9030,8947,6117,8901,9079,9195,8999,8902,9186,9052,8543,6981,7550,9220,7615,9086,7883,6642,9200,9248,8500,9346,9348,8805,8935,8800,9363,9321,9353,9453,7582,9372,9386,7758,9213,9402,8919,3165,9468,9335,7221,9558,2698,9471,9606,9541,9602,9377,1277,9552,9607,9638,9615,7856,9634,9554,9654,6858,9406,1699,9769,9668,8514,9825,9600,9455,5484,7910,9454,7017,9374,9922,9116,9308,9221,9835,9945,9952,9964,5222,3302,5210,9986,7830,6824,9834,9814,9212,9937,10021,10018,10019,6113,10002,9910,9884,10001,9928,9896,9900,8933,61,3117,3134,9883,10039,9831,10062,9799,8006,10131,10116,10188,10129,9935,9639,8777,8776,10063,9258,239,9347,9352,8923,10173,10115,10057,10048,6010,10148,10245,9730,9951,10047,9942,9387,773,5692,5743,10243,10046,9879,10288,10283,10227,10130,10505,10284,10374,10528,10548,10373,10526,10376,10368,10375,10469,10674,10556,10394,10725,9593,10201,9591,10139,10562,9983,10199,11020,10938,9589,9587,10559,11028,9833,10892,10518,9407,10871,9588,10268,9430,11135,10894,10727,10472,11156,11021,11122,9832,11104,10750,11136,11154,11139,11220,11218,11154,1699,10225,10649,7599,10211,10738,9389,10956,11010,6845,11314,11324,10830,10266,11018,10289,11287,11288,11126,8586,11233,11406,11360,11379,11299,8390,10719,9814,11340,10463,11361,10565,11353,1537,11442,10526,10904,2992,11437,11378,10895,9193,11396,11382,10879,2506,11304,173,10823,11351,11455,11493,3521,11409,10893,177,178,179,10314,11443,11495,11489,11522,11552,11598,9950,11599,11093,11377,11606,11480,11608,11342,11523,11600,11655,11658,11646,11285,11661,11620,11656,11453,10892,11722,11678,11691,11479,11289,9244,11681,11670,11201,9339,9381,11383,11491,10188,11621,11724,11488,11786,11785,11373,11107,11455,11764,11770,6704,93,10731,10721,11602,1969,11775,11202,11441,11851,9601,11848,11408,2590,5322,566,6130,2677,4452,2615,3908,215,6255,1370,6633,7113,5188,6119,7095,7117,6175,6310,6103,409,524,7295,7082,7238,7023,5995,979,5066,2261,2520,2522,4614,6701,1746,5331,6740,2605,5386,1016,6957,6702,6957,867,7646,7118,7649,1411,3609,3698,810,7076,7081,7116,5763,7106,7109,7087,4390,7153,7114,1165,7653,7599,5297,1685,7122,6272,1266,6623,8080,8042,7291,7269,7285,7101,6709,7096,3550,7808,5332,3754,7932,8049,7643,8281,8077,7245,7931,7906,8444,7967,7605,8541,8552,8304,8480,7658,8088,8435,7903,8542,2389,8283,7154,8721,6870,7284,8706,8389,8266,5371,8628,7068,6359,6890,8290,7262,7124,7294,7289,6656,2521,3644,3359,7110,8207,7661,7675,6332,6855,3725,7089,7276,7248,3014,427,8306,7282,7084,7249,7019,7761,8222,8793,7280,9195,4659,735,7283,6364,7094,9338,7247,1998,4185,7254,7293,7671,8047,8284,8064,8079,8052,8053,8063,6381,9552,9137,8578,9149,8434,3380,6263,1685,1266,8459,8449,8580,8824,8972,4555,180,7904,9743,9793,1257,7588,7721,9614,9888,9868,8166,9959,7239,8581,9931,9933,9030,9386,8725,4639,9936,9950,9349,8922,223,10040,9951,9973,8566,10026,10088,9547,10087,7704,9879,9989,9536,10086,9534,10239,8202,10089,10090,10265,10008,10260,10257,10292,10247,1645,10237,10044,9892,8087,9785,10362,10321,10061,10272,9824,5053,5056,5052,5056,10320,10520,10526,6656,10574,10575,10574,10212,10297,10505,10650,7816,10229,6977,10211,10176,8780,5064,10222,10811,7910,10814,4765,4535,10302,10546,10913,10546,10965,10821,10938,10914,10827,10131,11027,7815,10512,10011,11072,10113,11121,10114,6898,7206,6240,10881,10519,10839,10840,4254,5743,4598,1311,4854,240,3213,3647,4022,2915,3306,1196,258,2660,6845,4028,6104,4087,5222,2700,2046,3501,6824,797,6560,955,1561,7009,3534,6979,4985,7212,1349,1474,4779,1381,3564,6337,6342,4834,7790,4230,1126,7846,1164,6261,4659,721,3392,1142,5093,2736,7861,1366,6732,2451,7023,5997,7780,7981,3979,1886,7821,1327,7712,6850,1047,867,2384,7005,1113,2590,6875,1134,8224,8206,8358,1970,8706,2677,8706,5314,2677,7354,5314,4901,7354,8306,4652,1016,3287,8805,7829,8961,5790,6314,3425,2749,8551,2749,7982,8933,8963,8795,8934,4598,9116,7906,7038,9061,8442,836,8915,8829,8923,6679,8935,9215,9275,9212,9377,6713,9600,8804,9653,3159,8894,9213,9834,9278,5379,5544,9649,8827,7830,9836,10003,9730,9831,9983,9900,10039,10349,8172,9603,10399,10289,9964,9959,10395,10396,10307,10246,10765,10306,7804,8144,9832,5210,9922,10368,10016,11402,10907,11385,2849,2085,9406,10543,11310,10674,10881,11116,9542,11551,10466,972,11606,8620,11658,11670,310,11266,10000,9647,11436,11443,11446,9046,1953,11371,9741,10512,9299,11187,9050,8916,7836,7671,8991,698,7605,217,7776,8606,9335,9197,8978,1439,7025,8829,4050,9200,8780,9541,6117,8102,9242,9196,8688,9636,9764,8904,9666,9779,9635,9799,10112,8812,9769,7239,1349,9028,7276,8876,7900,8284,7872,7903,217,5513,4023,1741,156,7088,6664,9304,7815,7086,9308,8877,4796,8880,8477,7088,4535,9299,8889,4019,9561,8369,8460,9581,8772,8071,7674,8636,7285,8286,9910,9922,9959,10022,8184,4765,9817,9819,9818,7097,9526,2032,8169,6769,8106,9125,6872,6889,4563,7144,5052,1142,8430,5053,5056,10116,9666,9212,9991,9377,10008,2122,5420,7037,10081,10754,8092,9554,9036,7830,6805,10312,11021,9758,8915,9492,7987,1369,11129,11103,2288,10412,7285,5688,10847,11334,11338,10022,984,7666,7175,9438,365,380,376,8172,5903,11554,11630,11753,8891,9956,7086,11757,7935,11370,9471,9942,8923,7156,4131,9363,6595,9639,9353,10395,10057,10042,8888,10469,10039,10472,10569,8514,10341,10245,10246,10523,9910,10745,10397,10743,10568,7354,8808,6639,7138,10048,10289,10342,10935,10934,10990,9983,10783,10892,10653,6684,6792) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC