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,8712,9257,9758,9614,9674,4800,8240,9888,9889,2032,9870,9959,9132,8081,9556,10003,9933,8460,10050,10125,8914,10175,8302,8278,8276,10234,10230,10267,9538,10179,9325,10269,9205,10261,9133,8275,10472,10499,9813,10538,10624,8199,10625,10021,10673,10513,10672,10741,2989,8547,7149,4659,7115,7654,8306,7252,8092,7253,2117,9701,4563,2658,6264,9538,2761,2467,7940,5912,4399,8629,7946,4566,5193,5236,4656,6986,1327,8031,4061,4405,6560,6559,778,10060,9751,9758,9221,9750,7106,8395,10211,10233,7254,1349,10227,10237,9257,8391,10244,10236,9132,1521,8089,9353,7017,10245,10226,9935,773,8777,10359,2261,10541,10550,10587,10567,10588,10586,2079,10666,7121,10524,7716,9870,10743,10807,9831,8211,7932,10820,10239,3542,5763,3715,7895,10976,7125,11021,11025,9259,7125,10977,7087,10904,7252,9900,10749,8047,10899,223,7265,10747,11126,10765,6845,11115,8030,6104,6870,11122,8741,2294,1253,5545,5339,1347,5817,3080,4258,7883,4460,608,2933,6858,7126,10246,10869,1699,1830,8500,8668,8206,4395,7920,7839,10350,10692,6832,10690,7280,11679,9206,10659,11540,9959,11558,11785,7792,11402,11496,7778,9889,10949,10366,10585,11528,8891,10702,6,11704,8477,10027,10863,3159,5020,5817,7920,6785,8305,1349,6901,7037,6848,5903,9258,7919,3216,1834,1830,1110,986,4131,780,772,6679,6001,5764,6971,743,9063,5011,7143,4617,9837,9541,9471,5142,7856,7758,9924,9928,30,9929,9937,4109,8142,9831,8813,9783,7221,6397,5328,1313,9963,5544,4164,1707,1237,9916,9769,9222,6599,10088,10090,8912,10087,9990,7893,3346,9941,10001,3787,3657,2446,10165,836,3287,10350,9607,10148,10132,10342,10134,10526,6691,6986,4019,9614,9372,10543,9406,8910,9937,8836,9003,10012,10685,10955,10988,9554,10734,10548,11020,11018,9950,11042,8795,4652,217,11027,10512,11127,10938,8222,8793,9552,9925,11219,11285,11202,11288,1698,9922,11353,10246,11230,10568,11495,10974,11397,11235,30,11655,10660,11217,11646,7064,11598,11455,11644,8925,8901,8947,1349,7920,7037,8837,156,6266,4805,9033,1738,2467,9038,6986,8089,8884,320,36,1349,6569,7647,2989,3719,9196,665,4395,9249,3142,446,6266,1439,3523,6863,5331,9195,8915,7019,9464,1215,5732,9376,36,8089,9553,9556,9557,254,9526,6845,1461,8934,4947,4769,9637,9372,24,104,9639,5142,206,9648,9654,9641,9750,7388,458,947,9824,9779,9930,9543,9926,9363,162,30,145,739,9937,9340,9972,9965,9221,6986,10062,4156,10057,10063,1325,608,7602,9553,9638,10149,93,9764,10042,6798,9635,2976,3878,1559,8358,2594,220,10212,6632,6104,6261,446,1299,7138,7036,10258,10244,36,228,6117,6163,61,10267,501,93,10300,9335,9754,6858,5148,9811,10182,9638,4056,1347,9764,10243,9220,10227,9052,5267,10476,10350,7017,10341,10416,9476,41,10396,10541,10530,10543,9807,10568,308,8999,10127,9249,10548,10657,8615,10548,10608,10523,10622,10569,10652,5795,9107,10528,10663,9937,5513,739,61,10780,10719,10375,1127,1257,10784,10787,10749,10870,228,10893,9798,10894,10669,6696,8193,10895,10672,10878,10737,10870,9353,10798,10883,11021,2706,11028,10856,10964,11041,10879,10784,10871,10748,11027,10373,9406,1047,252,10683,10764,10512,11123,11106,11126,6113,11018,3532,10667,11122,11197,11235,11135,11219,11234,11129,11180,11199,11281,11220,11041,11287,11142,11171,11200,11340,11105,11324,10744,11330,10754,11104,11361,11201,11377,10747,10566,11353,11227,11107,9935,10783,9910,11234,11349,11288,11455,11127,11492,11495,11266,10910,7810,5997,11478,11442,11494,11488,585,11395,115,11489,6696,180,9248,8934,11593,10747,10892,11134,156,3523,11599,6696,739,11324,11647,11491,11396,11646,10246,7761,11670,11644,11550,11689,11594,10065,162,11491,9402,11658,11455,10548,11309,11594,11180,4258,10798,11646,11613,8031,8869,11235,10568,9749,1298,4969,11480,10917,10126,11477,11783,11787,7995,57,10531,11479,2590,10919,11606,10002,11644,5046,4325,7017,11827,10917,11834,228,11871,11838,11764,11819,11835,11849,11872,3904,1253,10065,28,30,11495,10892,8175,9038,9036,9258,9402,9439,9366,9278,8925,9406,9372,8999,7874,9220,8999,9273,9086,6642,9627,9552,9554,9614,9543,9249,9937,8089,1699,10003,10042,10050,3990,9904,10063,10145,10039,10056,10212,10265,10229,10246,10243,10127,10342,10355,10341,10227,10354,10002,10514,10268,10528,10568,10543,7582,6124,10548,6595,10472,10569,10749,10733,10787,10777,10836,10870,10879,10397,10938,10892,10893,10895,11020,11021,11121,11122,11018,11089,11106,10871,11202,11220,11219,10523,11237,11235,11353,11324,11381,11349,8140,10665,11455,11377,6510,6212,6530,6509,6223,6531,6511,6512,6529,6538,6537,6533,6515,6508,6535,5386,6528,6523,6514,6198,6200,6382,6390,6066,377,979,726,810,6513,1165,6223,1461,5995,5691,313,5996,7019,1038,3384,3385,3702,6872,7299,6364,3428,7239,1524,7761,2824,5691,1349,4136,6214,7149,7981,8031,6216,6496,1704,7608,7698,1767,1766,2989,7753,1769,1770,1765,5763,1771,1767,8178,8362,7890,4258,5362,7083,7973,1769,5142,5339,8548,8240,7919,7126,5817,5912,5817,6903,8716,8773,1016,8773,8805,8846,5763,8547,8900,2967,8900,8220,2023,1970,659,6205,5373,8716,6,1327,8902,6953,9086,9372,7804,7790,7584,9552,126,6629,7926,9348,9374,10000,9378,9639,9648,6163,9937,10146,10187,10065,9945,311,2913,9281,10350,10130,10416,10212,10568,10115,9548,10528,10749,10895,7893,10904,8214,10667,10721,11025,10566,8871,7024,7077,10816,10210,10413,11197,11200,11034,11063,10787,10820,4901,10914,1576,11201,11347,11324,1886,958,11130,11402,11278,11488,11376,11117,10039,10494,10885,11115,10687,2266,11495,11449,11497,11455,4154,4520,11782,8937,8299,8144,8516,8468,1385,11272,11234,10720,9277,11776,186,9296,10072,9052,1881,10449,10394,176,9915,9868,4233,4659,9887,2925,2123,3613,5640,10016,9931,9548,666,9005,10566,10013,10015,10017,10018,10108,10109,10110,10619,5955,5959,9950,10086,10620,9403,10621,10648,9481,10012,2160,6117,271,4886,6981,4901,4730,5245,7837,1645,4767,423,7834,7836,7919,7903,6205,7835,7821,7143,7833,7761,6478,1461,1325,1970,6595,1433,8222,2992,2029,4160,7760,7760,5542,3080,7130,7130,8812,8813,7852,3169,8250,6397,3913,6876,8098,8098,9222,9223,9224,9250,1536,9300,9017,61,9275,6870,6870,4346,9243,5286,5286,5997,9073,9614,9366,9552,9769,9477,324,9478,9641,9118,2660,8610,8184,5252,9925,9925,9921,4510,10088,10087,10090,10089,10056,10086,10210,10079,2137,2137,3936,3525,10227,10229,9624,8705,9766,9968,9959,5763,10375,10212,7149,4178,4178,10608,8441,10523,9376,6103,9297,10434,7972,10548,7973,10382,7585,10397,6264,10711,10056,7218,10748,10702,5567,7889,10870,10127,10749,10127,10350,11093,9255,11324,11455,11396,3059,4739,11105,11457,11489,10754,11517,11302,10012,11130,11741,8812,958,4741,11789,4535,1095,7773,4395,5996,3428,4395,2932,4209,4079,8902,9630,8092,526,546,4796,4769,5995,4860,9761,9746,1439,9785,10002,9808,7920,9750,840,608,7839,9668,3941,9925,9638,9220,10173,10165,10149,6632,10243,10115,10135,10245,10233,10229,10244,9993,10042,107,10148,10188,10243,10246,10284,9406,5647,9453,10266,840,5419,10440,1461,10080,10258,10380,665,10283,10439,10141,1215,10212,10268,3913,10314,10375,3989,4861,5148,9052,5799,1257,10062,10227,3241,2706,8893,6842,5070,9602,8514,9420,4234,2632,766,10787,4861,4901,2894,2594,8517,10879,10894,501,396,10128,10895,6842,10375,10306,9453,11028,10020,9780,10569,7614,7615,7550,6713,8837,4082,7017,8888,11237,9454,8925,11488,2706,10856,11349,5373,252,3542,1521,9220,10375,11593,9904,5739,9374,9615,4455,4739,10857,4455,4739,10857,1490,640,4411,2023,9987,779,11644,10798,10300,8049,7906,10342,10530,11595,11678,11594,8548,9850,9348,6557,6961,739,11492,1127,10131,1767,7631,6354,6220,1768,1766,1771,1765,1770,6688,9920,1769,10176,10098,3073,10175,3071,8583,9880,4714,6689,9679,3070,1266,8727,2506,272,6198,5810,9824,7881,7752,10053,9665,8899,8897,10067,8896,6200,9867,9031,8489,6215,8668,1766,4842,4286,6218,4297,6216,2794,2791,6497,2789,3071,6880,675,2786,2785,2787,3465,2783,2781,2779,2780,2782,6443,7868,4304,4293,10258,2778,979,7311,10238,9473,10251,9669,4224,2951,1970,6679,9477,10188,3385,6002,8233,9073,9243,9478,545,8714,9383,9476,529,40,10055,3358,10294,9483,5207,1690,7185,7184,8815,4223,9632,3525,1369,138,7178,7179,7632,7189,4386,7176,9921,9637,1137,7187,6198,6362,1325,10258,10398,6382,10608,3875,7837,7834,9376,10607,7835,4931,3254,10552,7836,9297,10467,10536,1557,10568,10232,4,510,9474,7771,7770,6688,511,512,7637,9626,867,9067,9625,9670,9671,10612,8729,9475,8881,8161,10364,9624,10626,8882,8878,10642,10647,10639,10643,9880,9625,8880,10644,7569,7762,4804,7567,7570,7764,10298,9493,7698,10641,8016,10640,9906,9907,9970,10043,10253,10255,10256,10637,10646,10254,10752,10531,7300,10645,3165,10521,10753,10548,2261,6855,222,10522,1520,1917,3059,1461,3595,3493,145,8306,4178,5995,10212,11105,6710,7019,6876,7761,11032,8222,8793,11031,9195,9552,9925,10229,11106,9661,10397,8965,9675,9655,3874,4923,4146,3409,7172,3511,10749,10938,9993,10544,11033,7753,8627,11109,8088,8946,8945,10927,8944,8668,6263,10975,11121,10641,3236,9933,7810,8110,10239,10821,10822,10931,10930,10840,10639,10637,5066,8943,10748,10926,10928,10797,4923,11255,11252,11254,11251,7592,7554,7754,7755,7756,7927,10564,8509,11246,6740,40,6683,145,9635,5,173,8978,10207,11217,11240,9363,6639,4023,6732,2843,5431,8220,9300,7238,7912,11325,7849,10056,10836,1368,28,6598,10637,848,7580,1769,1766,1768,145,8175,1765,10893,1983,7304,11101,11395,9072,11397,3327,11398,11401,9543,11382,30,152,801,9,11383,1230,9352,8389,11381,11328,11431,11421,11171,10057,7356,6773,11396,6792,10687,4510,4752,1973,10788,11442,5363,122,10827,6359,1411,9466,11479,11473,11476,11359,10829,11478,11480,11468,10278,3014,6727,5513,11177,11477,6692,11416,10520,9149,8154,8002,11067,11071,9322,11517,11181,11550,8904,9677,11342,9378,10350,8688,11598,11552,4329,11175,947,4103,1145,6632,7580,6023,2677,7760,388,4563,7815,6986,2776,7599,272,6642,7605,637,7751,947,6871,6315,3803,7759,7972,7938,7354,4519,4558,7973,7837,1234,7834,7835,3189,5143,7836,5142,5251,8089,3066,8140,5936,8150,8111,5094,7920,4731,6713,8215,6691,8222,8193,5431,5536,8304,6810,7016,5817,1349,7005,2451,5947,4325,8390,7642,7105,3026,8281,840,8358,6732,8547,7246,8514,320,6693,8305,3913,8548,1738,5763,6354,8816,6595,5334,8802,8213,6726,4652,665,8730,8839,6778,8910,4730,8885,7903,8629,8220,8932,4936,9049,3542,4944,1886,36,4945,4941,7126,4940,4943,1521,4942,3775,4460,4939,4938,3449,1176,9300,8478,5841,180,1177,2657,9466,4950,3080,1042,7772,510,7770,7771,511,512,7637,7592,7755,7756,7927,8509,9880,8999,7019,8222,8793,9195,9925,9552,177,178,179,10229,10292,10056,9461,10063,10227,9769,10528,10526,10548,10543,9406,10358,5756,6659,9533,9675,9879,10964,10836,9383,4834,9867,10232,10278,10938,254,9220,8904,11121,10626,9677,7928,8688,9196,8547,9636,11171,10397,11219,6857,11439,11361,11324,11455,10748,9929,11397,10476,10149,10784,11396,7581,6117,9347,6731,9648,4536,2873,11374,6730,4329,6692,6113,5175,665,6141,1533,1073,4199,1051,6158,2913,1050,186,2530,5576,6633,435,3904,6001,1145,2182,2261,176,4154,6962,446,1370,466,2490,5421,3989,1272,1770,1126,7607,6785,6845,1038,6986,6158,8358,8547,431,7265,7661,8947,6130,8047,8034,4068,5142,7605,9558,9652,7143,9959,10060,1769,970,9053,7164,4464,8282,3872,134,10238,2736,9378,10531,9920,9264,7607,7913,2467,8714,8876,9607,9824,8828,11201,7655,7674,7661,6119,9608,11363,11713,11117,11631,11632,7252,11674,11312,10506,11683) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC