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,2331,1245,4964,6221,4178,8324,6740,2021,7238,6270,1557,1380,8220,8247,5763,7300,217,6508,8345,8490,6512,6510,6103,6199,6533,2467,6373,6768,8244,2989,7923,1303,6831,2374,735,9001,8151,6880,9243,6855,7594,510,9505,8869,1052,9450,5839,9900,10228,4405,452,4800,10305,8135,2164,1557,2164,9931,11134,8435,8257,10086,8922,11352,9871,8262,11437,5997,1049,10741,11101,4362,8377,11519,4720,6806,4860,1371,3941,3860,5996,2976,5764,6315,5020,3561,4566,252,793,1402,836,4234,5321,3100,5088,606,5764,4969,5286,5837,6779,3037,1907,1137,1690,4875,6686,8215,7156,1176,7840,5541,1177,1190,2324,4766,4223,2381,2882,3525,5795,5543,7875,1835,3921,6635,4088,6639,8004,1439,1163,5373,7919,9073,9086,3625,8901,252,5142,1521,1137,5131,7858,9243,2657,3715,8793,3493,7016,8902,8888,4056,1177,7582,8629,228,6866,9376,8901,9464,8900,5541,9402,9376,7883,6707,5379,7017,8999,2294,8900,7875,8548,6713,8819,5339,9638,2957,9197,9654,5817,9637,1347,5545,7126,9766,9552,3754,9798,9335,9807,9879,1253,1461,1699,9925,2933,7017,7839,9764,8978,4258,608,7126,8548,9454,4460,9680,6858,9932,8999,10056,9661,9542,9961,10055,9993,10036,9929,10134,9769,9952,10116,5986,4805,4701,2976,9421,9453,2025,9273,9904,10063,4209,10065,10229,10244,8151,9897,10079,10212,10042,10243,10244,9665,10053,10118,773,10245,10211,10149,4652,9541,9347,10258,10227,9045,4337,9249,10307,10377,9831,8805,10342,10355,9476,10245,10062,10246,10266,8934,8915,10523,10524,10473,9833,10548,10397,10568,10523,10528,10127,10627,10416,10348,4665,8010,6248,10246,10628,7718,10350,10569,10734,10879,10735,10899,10341,10798,3413,10870,10300,7614,8795,10737,10938,10375,10814,7615,10894,10711,10608,11020,11021,11023,11018,10972,11042,10913,11089,10878,10765,10893,10911,11121,9930,11122,11126,11123,8948,11100,11142,3003,10749,10783,10784,11171,9072,3288,11220,11219,6117,10530,11234,11230,11237,11235,1134,9634,11199,10910,11287,11288,11285,10719,4028,10798,4665,4209,3134,9922,11349,11361,4103,9928,10990,11353,8048,8041,7261,9930,9929,4798,7068,8071,8439,8368,9461,9931,10244,10227,9817,4178,9543,10476,10149,9961,7086,8837,8793,446,9661,9195,5995,9160,7258,1349,11028,1350,9542,10063,2594,11021,11219,766,1215,6842,1257,2706,2033,2632,9453,2932,501,10375,4234,5148,3989,4796,5070,5799,10878,9648,9634,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,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,10315,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,8585,4730,6315,1690,9376,9376,9137,5454,8520,5763,7099,979,8583,7808,9407,9638,9634,8584,8824,7631,9493,9591,9590,9084,7546,6201,9588,9587,9149,9593,8596,9535,8325,9665,9589,9430,8782,9429,8324,9637,5321,8323,9867,9725,8358,9920,8583,9407,9084,8585,7546,3898,8682,3898,10053,7870,1038,3542,1521,10055,4136,6824,9811,5995,10232,10090,10087,2160,10080,10238,7016,10182,10112,4624,585,2025,3288,3904,10342,10523,10479,3159,5692,10548,9808,5743,9471,10048,10212,1770,1765,10212,9942,1767,10719,1769,6354,3070,3073,3071,6689,7753,7752,10674,9212,8088,8627,9037,9665,10053,10544,6688,10975,8943,10894,11142,9798,11221,5799,107,4082,11423,11020,9477,8943,10672,11288,11310,10673,11550,6354,11644,11748,11670,10892,6177,3921,3585,3100,3941,6599,1248,3479,4046,3172,1038,5148,5215,4740,1038,5764,455,4045,2421,4739,734,1152,5081,4088,4455,5837,2387,4539,6703,1163,2381,2632,5331,4861,4385,4045,1954,5543,4670,7810,7718,7857,971,6552,4752,3989,7761,3976,3493,6563,585,6556,4209,6883,6863,6576,4878,6993,7840,2863,8183,7879,7878,7857,4773,176,4220,1917,7903,7834,2674,748,752,836,3454,967,1826,231,8793,3715,4082,1521,3370,7614,8888,8925,8901,5373,7615,4258,5339,5545,5817,7126,5247,3368,7920,2294,6861,1253,6858,7883,3080,2933,8615,8548,8999,5837,7857,608,7839,1347,9372,1699,9614,9195,6809,6845,6104,9200,9541,9366,9300,7619,9925,9321,7619,7875,9897,8890,9463,9937,9777,9349,4460,9888,7928,4223,9478,10065,8846,10039,8948,107,9615,9993,9464,9661,9808,8819,3549,9258,10090,10087,9527,10243,10089,10088,10342,3346,9052,10260,10480,9374,9453,10548,10212,10265,10259,10127,9798,9929,10568,9347,10476,9634,9930,6117,7581,10784,3080,6857,8543,9648,10878,5339,10086,9961,10915,10523,10375,10626,6632,10149,10937,6793,145,10738,11020,4765,9045,7919,10210,10913,9387,11142,9389,11022,11235,10804,10938,11219,1232,11195,2615,9198,11280,11234,11220,11281,10227,11282,11122,11021,10528,11324,11272,9647,10110,10911,8889,11131,9959,10911,6824,4901,10014,10013,10012,11423,10108,10109,10016,11495,1232,10017,10018,6981,10004,10005,11489,10648,11455,11608,9212,10619,10164,10015,10621,10620,11443,10894,11314,11361,11645,11435,11349,11705,11551,11699,11670,11661,11491,9220,11646,11495,1185,11235,11280,11608,11703,11488,11455,11838,10355,11919,11923,11872,3891,3892,7986,3896,3890,3884,6493,3889,8271,4659,8144,1738,5995,5543,5373,5339,5349,5251,947,947,1349,228,6559,1038,4395,1461,8089,9526,9527,9811,1215,5995,1257,8306,9831,9569,9551,9566,2331,10020,6571,9982,10081,10093,10088,10087,10090,10080,10092,9991,9890,9222,10165,9913,10128,7803,9981,9570,10002,8252,7029,6901,10288,6902,10413,9528,90,4765,9647,9798,10002,10089,3549,461,10113,2164,5134,7919,1371,10294,10261,6119,9296,10293,186,223,666,7632,10667,10950,10702,10360,10724,1080,7775,322,8305,8780,4535,10451,11130,11394,6898,10821,8820,10974,675,9297,10608,46,2658,11518,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,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,10315,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,6806,6684,5817,8146,2590,3561,6639,752,6674,784,5339,6595,9197,9200,5936,8171,9437,9438,9639,9527,7156,6679,145,6683,7126,7354,9214,8923,8999,9269,10568,2261,10065,2294,5477,10472,9749,9730,9750,10055,10524,4452,9637,5371,4652,1349,8805,8915,8934,8935,8979,8795,8932,9924,9657,3195,1432,6973,11018,9248,9249,9346,10245,10246,10879,10341,8514,8910,9406,10543,5795,11235,11287,9922,11237,11028,7025,4553,2393,5349,10569,11126,11349,11020,11353,11377,1698,9928,10719,11340,11599,11379,10002,10368) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC