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,6188,5995,6315,1586,1537,5763,24,223,6103,6415,6383,435,4659,6412,2294,5596,6414,5576,1351,6752,4230,3247,6947,1207,7023,7089,7068,834,6858,6171,7238,7209,5743,4146,4652,3159,3437,5996,466,1741,1572,3457,7022,3554,3754,4597,6,7032,566,6856,6984,7304,6110,2328,6940,7143,1536,7837,2118,7659,7834,7835,2594,1741,1210,7833,8523,665,1349,1016,7836,7840,7879,7878,8306,1215,8514,6010,5609,8358,8927,2737,8389,8915,5371,8681,8698,9041,8817,4131,8869,8884,8442,4901,4544,7823,1257,2677,4519,8901,6104,6809,6845,3162,5996,4049,1453,834,6315,6642,5636,5837,2118,5764,6709,1576,6710,1953,6861,4185,6863,4570,36,6364,6713,4277,6645,2160,3715,5013,6123,1559,4767,4886,739,6981,6842,5997,6994,4131,6740,7238,1127,344,7138,6862,3557,7761,7835,7836,6858,7779,3059,7126,7019,7878,7919,7833,7304,8019,7981,7016,7992,1521,850,7834,7751,8220,3217,8193,3754,7972,7580,2419,6698,6857,7973,6117,6962,8547,4798,8440,4510,252,8355,8353,7541,6984,6127,2023,8356,4617,8807,8827,7970,2183,8306,8305,7860,5739,3823,8955,8997,8543,8910,6968,8681,8933,8355,8698,6174,8948,8353,7974,8356,8817,7032,9258,9222,7928,9223,6412,6967,3595,9009,6175,4806,5602,9223,8222,8793,9195,9925,9290,8290,9888,10039,9926,9835,10212,10229,8169,10127,10355,458,6177,4218,714,408,1084,6349,6642,1881,6710,6741,5953,4765,6709,5949,931,6779,186,867,4597,2520,6789,579,5093,431,6813,6986,4898,5923,6561,6832,6622,7019,452,5769,850,6842,2458,1616,2490,7239,405,698,1151,617,3395,3046,739,5088,5647,6004,6804,7359,3609,7547,1308,6193,7374,7759,582,1461,7760,7776,7872,582,431,7899,6312,7790,7889,7908,8031,7871,8103,7907,1265,698,7889,2521,8110,8222,8214,7962,7953,8183,8388,8195,8182,5455,446,1815,8483,8547,8358,7547,8390,7022,961,8629,8611,8725,8765,2006,2029,8793,7128,1052,8835,2989,2310,6622,6115,6190,6193,7790,5998,2093,8947,8918,2156,9027,5484,244,9038,1250,2093,1324,176,2374,2749,4401,1271,1497,3425,4659,6103,6701,6488,6205,324,2171,1324,6342,6163,934,52,6875,2182,4535,4774,6210,4199,418,947,5331,6622,1439,3979,2027,6958,2729,5912,6972,1366,867,6806,6973,6974,737,3148,6890,6798,5822,5763,5986,6488,3425,6193,52,6240,3250,4659,2182,5314,7068,7097,2749,1016,6264,6975,5564,4683,4684,1210,6103,7154,6832,4535,324,7218,7149,2490,7823,5763,3908,7108,7081,7990,7893,2847,7880,3346,7993,7804,4339,2027,7715,7079,6264,7270,5912,7281,7285,7154,7906,7284,7941,8283,8081,7941,7286,6103,5245,8085,6205,6138,1016,6121,2897,324,5822,359,6796,6633,8610,6904,8141,6193,8141,7584,3425,8279,4559,8560,8063,8058,8639,8445,8046,7714,8575,8653,8438,8570,2447,6795,186,6691,6792,7559,8248,7505,7496,4769,6971,6484,3073,6691,8305,8220,9038,9108,7374,8780,9200,9215,9323,1572,2265,9380,4553,311,9258,9372,9648,9666,2522,8583,9281,8584,7311,9281,8882,8878,11039,11053,6596,6633,358,6891,7143,5915,6102,7146,7144,7238,6947,7130,5912,5421,4154,6364,6863,5331,6831,3428,4983,698,4765,6712,7127,1184,7239,3647,7773,7781,7751,3346,3728,7592,6687,7554,7754,7755,7756,7068,7761,7840,7879,8222,7878,7910,5997,7363,7288,501,6158,5070,1461,675,4801,2753,698,308,4765,6156,6695,5763,958,6842,1350,5904,6633,5910,7238,3728,3043,1738,2261,186,6845,2932,6740,3830,1029,223,1183,1645,2615,4898,2182,7210,8220,2063,5959,8554,8962,9202,308,6121,186,3647,7783,5763,9198,2117,6364,9392,3172,2925,1232,2658,9422,6103,2627,7238,1371,5995,5962,6103,6845,6104,7576,6691,6632,5763,6843,2615,5142,8150,8281,6809,3030,6984,6394,2635,5782,186,6210,8230,6726,6693,2467,8305,931,7970,7640,3647,396,3761,8744,975,1057,8220,6642,8206,4801,8361,8680,8688,9007,8762,7928,9030,9134,9142,8081,8547,8763,3428,3440,3647,3647,659,7828,1183,7008,6770,9274,4068,7213,7374,7374,7951,7951,5965,6821,4774,4724,9975,9417,8144,8144,179,4767,1506,6559,6663,6876,5088,1520,793,464,5907,6001,308,585,600,6162,6168,358,3892,5647,4969,228,7258,6813,7304,6766,6954,6812,4217,7160,1830,6794,7144,6780,6155,2328,2506,6695,2863,6831,6802,7838,3046,7783,4983,6767,2419,7602,2573,6160,7146,8020,4735,6159,725,3728,6811,8093,6588,7143,6605,6971,4570,6128,8096,8526,6726,8230,7822,8503,8836,6172,7304,8611,8184,8512,7887,8109,8852,8489,7897,8869,6104,8869,8032,7850,6809,8118,6845,8903,6104,9075,9116,4860,8630,9052,3725,7920,2023,8500,7839,585,8948,9366,4220,9354,2925,8933,9369,1490,8955,9541,8806,9069,7022,9543,6135,9453,3549,8543,8305,6117,9647,9648,4765,341,9200,4652,9345,9374,9348,1349,8934,9346,9939,9249,9248,8795,8915,8805,8935,9924,6821,8492,9922,4566,9941,9928,4566,8501,4128,9402,4061,8031,10057,10208,9910,9117,10063,7759,4056,3936,10227,3100,1698,7138,6683,145,6986,6635,6793,6684,9991,4131,10039,6679,9363,7761,9258,10341,6595,7354,10548,7019,10688,8222,8793,8222,9195,9552,9925,10245,9993,5236,9000,9027,9282,10762,9034,3595,10879,10938,10528,10955,768,10893,8829,9352,1127,233,228,11127,9749,9065,3964,4635,4656,5046,5193,7760,11021,9038,8629,11122,308,4023,10246,6314,6779,6169,6674,180,148,6639,180,3493,2261,11324,6686,8808,11324,9379,7147,8923,8781,8257,3059,10572,10535,8539,6792,10573,11213,9467,10906,6713,8769,11489,11377,7077,11220,7156,11361,11439,7077,11361,11439,9629,11018,7077,4537,2294,9055,9204,8048,4046,10915,11124,9639,2019,11353,11599,7661,1895,11287,3288,10719,7662,10623,11125,11521,9638,10623,9220,6713,10042,10623,10042,7125,11126,11724,2923,10895,7084,5368,11678,11760,8709,8368,11237,11692,11501,11693,11803,11867,11868,10630,10272,8056,11867,10689,10623,11502,11777,10624,11647,7219,7491,7537,1499,659,659,6714,6714,7501,7501,7422,7422,7422,7472,7385,7385,7385,7385,7385,8211,9132,8269,7656,9053,7660,7658,7091,9813,7077,8044,7661,8721,7662,7287,10041,10031,9963,10021,10060,9963,4405,9968,308,10072,9988,9978,10061,9941,10056,10125,10121,10125,10183,10182,10163,9652,9917,9917,10220,9967,9918,8214,10228,10261,10111,9307,10269,9967,10129,10267,10412,10113,10362,9701,10114,10312,10512,10313,6889,9835,10550,10538,10527,10547,8290,10553,10240,10003,10541,10182,10674,10667,10649,10650,10566,10723,9448,10656,10741,10668,9979,10814,7774,10820,10480,10785,8515,9790,10935,10910,10786,10934,10938,10679,10905,6809,10976,10679,10905,10976,10679,11026,11027,9465,10303,11026,10673,9872,11090,7602,8268,8571,11094,11089,5688,11103,9093,10000,6769,11129,11127,10518,11121,11090,7970,10048,9336,11120,10229,11136,11200,11199,11222,11217,2913,10979,4254,10314,10778,11271,11169,11266,11280,11282,10184,11315,3647,11201,11338,11352,11324,11382,6646,11351,8517,3574,11436,11435,11447,11424,11417,7828,11447,11480,11496,7009,11494,11359,11477,11494,11488,8884,10873,8281,2063,9950,11112,11554,9950,11603,5688,11112,11554,11603,5688,11195,11608,11680,11679,11682,11717,9989,10294,10338,11736,11446,10875,11719,11800,11850,11851,11825,11855,11478,3913,11895,11879,11344,2615,11900,11904,11923,11902,8560,6381,271,539,2729,7304,2729,9438,7903,9300,9480,3647,1215,8306,9425,4598,8874,4598,8241,8244,8706,9182,9349,8337,7928,6768,9417,8245,9898,8922,7,9017,9432,9632,9296,10056,9296,9096,1165,222,3883,10292,810,10259,810,6359,9864,10337,6272,10337,10072,9959,3358,10640,8144,4301,10738,10667,10976,7833,9777,10814,11037,11130,11121,10951,272,10937,10954,9880,11323,6354,10007,2530,104,374,8490,11496,9277,2117,11272,11439,11690,11721,10533,1385,1402,11734,10269,10836,9647,3549,9389,5334,9387,10259,6780,10655,2913,9872,9963,10056,8305,9258,7130,10212,10712,10714,9295,3046,10724,10738,10342,10702,7882,9063,10763,10734,9868,10111,10364,10649,10786,8955,180,10715,10550,9736,9300,10836,10839,10838,3712,8151,9838,10549,10837,10721,10547,9453,9864,6712,9900,9349,8219,8706,10176,10937,7928,9072,10751,7776,10910,10974,10865,10086,10362,10913,7909,10090,10089,11022,10915,10088,10087,7998,8828,8182,10679,11043,10818,9090,7910,10649,5790,10632,10690,7715,11027,2736,2761,11104,9959,2137,3100,6103,9543,6740,11103,10784,11128,11126,11142,11202,11217,11112,11235,11237,3908,11123,10951,11222,8214,4079,3728,5013,4665,10127,3346,9810,10355,10269,10870,8010,7990,6622,10611,2615,11220,11349,10937,6633,11423,10125,11136,11226,8144,9757,10976,11065,11281,8763,8626,11041,9546,11129,11094,11352,9479,11288,11258,11105,11107,11604,10085,11491,11598,11495,11595,11498,10971,10668,11480,11132,11230,10655,11496,11521,11658,4950,3197,4724,11733,9406,10569,10786,11127,4882,11439,11747,11449,11492,9539,9541,9602,11550,11787,2092,10480,10651,9647,9985,9959,10655,9389,9387,6633,9031,2506,10466,1029,2867,10914,7602,6905,2658,10814,9757,9385,4862,8281,5,10864,10974,2867,10805,10804,9632,9362,11113,9125,1029,8578,11222,10738,11258,11072,2009,8358,11271,7909,5959,915,1029,10937,10464,10441,3647,11267,11312,9403,5810,11448,9763,5962,9062,8884,186,10655,7785,8281) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC