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,9647,3549,9389,5334,9387,10259,6780,10655,2913,9872,9963,10056,8305,9258,7130,10212,10712,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,6348,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,9198,7783,9161,1185,7572,8816,9275,8055,7675,2615,6715,6723,7589,9134,2753,6,8305,7840,7879,7878,6712,9321,5576,7879,2869,6122,9039,9449,8850,9116,2164,223,8826,9386,8815,9467,8358,8305,8822,8683,7636,4639,1368,848,9258,812,6663,8955,9308,9879,9606,8494,9884,6113,9772,9825,9969,4144,4663,9730,9963,9612,2253,9883,9900,7900,9967,142,10085,10073,9952,10087,10039,10121,10047,9990,5692,9942,5743,10048,10145,10188,8780,780,7865,2912,772,4109,4982,8845,7758,7864,169,9130,2170,8842,3610,10233,7775,10237,10247,10126,308,10241,10242,10225,5765,5623,2170,6681,10234,10124,10072,10319,3647,10364,10182,9834,8836,10294,3465,10480,10303,10505,10518,10293,10538,9214,10549,10177,10566,10436,10535,969,10656,10611,10751,10711,10665,10697,10777,10672,9919,10541,10780,10712,10715,10663,10871,10866,10892,10699,10904,10905,10868,10786,9257,10912,10467,10830,3159,10935,10988,10934,8913,9987,8912,10141,8842,6599,5707,10832,10781,10893,10658,11010,10398,10820,10807,10023,8076,8077,10588,9225,9247,142,10708,10710,10709,10287,9825,7793,11484,11195,11383,11435,217,7874,10679,10687,2164,11371,8076,7123,8475,11744,11436,11705,6011,8261,1516,1272,8187,2986,7994,6113,8110,7970,8091,7124,6955,8608,8547,2520,1586,8358,7607,7239,6119,8305,6979,8306,2246,7982,6821,1050,2766,6328,1051,7599,7615,1557,2946,8541,8483,7093,8742,8914,1049,6905,2507,6740,9053,8554,8933,9107,6788,9030,458,5052,4154,6261,4639,7238,8220,9300,8761,5063,8651,1556,5165,9259,7619,9381,8628,9336,7910,9327,8290,9465,9387,8208,9450,9538,9547,2253,9331,9647,9652,8063,9754,8542,206,8403,9788,311,9789,2913,7900,220,4395,9257,8763,9889,9046,9933,9967,186,8434,9963,10026,130,7671,2487,104,609,10163,10050,8439,236,10182,10073,10177,10225,10144,10257,9824,10261,10234,10360,10519,10518,10541,10547,10615,10820,10876,10910,5790,10712,10979,8206,11094,176,11010,10905,11200,9967,7250,11096,8282,7660,11371,107,7802,6809,10376,10294,10070,104,10658,4710,220,10293,10541,10128,10374,9374,8888,10087,10715,10149,4395,10878,7131,10820,10518,9799,10363,8763,10654,10655,10665,10144,10705,10658,9277,7239,10673,10667,7640,10653,10830,10832,9825,8485,10876,2052,10702,7874,11010,9125,10910,9448,9465,7303,9449,1381,10672,10820,7809,578,10514,10724,9758,7812,9009,11201,11198,11200,4898,11236,8135,6769,1029,11199,10905,10362,11339,10741,9244,11378,11359,9558,7994,8734,9046,10737,9308,10184,10541,11480,10021,10234,4395,11373,11487,9759,4800,8388,2453,11554,11473,11604,11456,9963,10177,130,11623,7597,8151,11588,11661,11719,10900,4510,10979,10892,5763,11218,11662,8169,10565,8667,11394,8778,10124,8027,11134,11870,11290,11496,11851,11829,11825,7640,8169,8835,11129,665,6785,10910,9790,10517,11199,1561,1318,10665,9872,9799,11272,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,9800,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,11142,5252,11443,8010,10530,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,10937,4405,9116,239,2490,8095,6119,10955,2063,10285,10092,10093,4144,8922,8628,10165,10133,10786,10552,10287,9547,10913,10286,8952,130,8995,2469,144,8008,2653,3304,4722,10702,2671,9349,10626,10830,3165,2467,6325,8870,8844,2454,9828,10805,2753,3908,4659,10257,9767,8995,10165,2490,3590,10865,8933,10836,3465,10241,2334,4164,5839,3646,7234,9983,9864,1185,3282,10715,6780,3549,4423,11271,2253,8706,311,11435,10260,11453,7785,7586,11134,11383,2628,8304,11302,3415,8169,9895,1232,665,9538,11669,8955,1052,11609,7824) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC