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,2911,4355,4510,6188,5609,3850,4536,2873,2871,4329,6692,6354,3070,3073,5576,2869,5997,6800,1379,1439,510,1770,1765,1771,6103,1351,1537,834,5995,3860,2992,1250,397,5998,6312,5988,947,1126,2995,1589,450,1379,7307,2183,6223,2824,6212,344,3828,2876,6167,2795,1765,1770,1767,1771,1768,1769,4944,4936,4941,4945,4943,4940,4942,4939,6658,6644,319,663,2808,4938,6215,7551,6501,6216,7258,8062,6151,1327,458,6616,3549,6103,464,3428,5334,3997,5882,6798,6840,6763,1663,6157,2998,3449,3069,6427,3389,6491,3898,452,222,4913,6600,6855,6388,2507,4765,3254,3169,6151,2684,6905,6129,464,4659,6181,735,393,6894,379,6146,2737,1049,397,7195,7199,8656,9088,6523,3327,8387,6545,8305,6604,8592,6616,6719,6700,9151,9190,3879,8097,6521,7400,9502,9647,9502,979,1351,834,4566,2605,2869,6740,5576,5297,834,3029,3850,6223,6223,8301,223,4639,8358,8815,8730,8489,8814,8547,8230,7599,9130,6953,4860,3989,501,5484,8306,1257,9215,5148,7883,7647,2989,1521,1954,1559,4050,4082,3625,2160,2976,4218,5247,2932,2706,7835,7837,3142,3244,1163,405,8030,1718,1738,8182,8146,3479,4983,7654,5763,8150,8103,7761,1038,5732,1569,4452,7158,504,8222,8378,8371,396,1350,1521,4082,6069,1906,975,1826,8089,8281,2381,2329,1907,8290,4834,4131,3003,8142,739,3288,2985,4710,6880,8547,6255,6855,971,8721,8628,8629,4005,1920,1954,8492,1830,3744,768,322,4217,1134,2863,4325,2054,741,8763,5373,7594,252,2989,8890,8851,3625,4109,3715,2337,8901,5839,8089,8904,8936,8925,3195,6707,8134,8932,2934,2294,8933,1052,9009,9086,8871,5997,7981,4624,2946,9196,4767,1190,3026,2054,4240,9197,9249,8978,8795,8805,9220,8087,7121,8045,971,9135,9373,9366,9335,4136,8919,7138,5460,9466,9478,9477,9322,9455,8914,9539,9557,9578,9471,9464,4800,9353,9547,9607,9200,9332,9543,9654,7213,9333,9637,9680,9799,9798,9764,9769,3849,7640,9910,9904,9913,9914,162,9766,6189,3216,435,344,5572,6645,228,1145,5839,6540,6122,6544,6172,6257,1425,1210,5777,3825,501,2594,5459,3302,6350,933,4079,463,5305,7850,3428,6544,6971,501,766,4860,7240,4796,3217,4861,3264,8390,2632,8306,3989,6167,4454,8781,6740,319,5995,8648,6332,2300,8151,3531,6364,2389,4405,1487,5484,7607,6371,6175,2467,6151,1738,4289,7741,5691,5904,6526,1462,6212,7913,6742,391,3885,4512,8700,5386,6953,8388,2455,4701,8780,4769,9391,3515,1116,8247,8980,4424,6832,735,8896,2989,222,7178,6181,3036,223,8899,2389,8242,5567,7186,6444,961,6377,452,6523,9692,6652,8825,7189,9559,9631,7764,8279,8816,2778,9996,7762,7570,4437,9949,9970,9338,9792,9880,1245,7725,9763,9665,9616,1770,9950,9492,52,1765,7,9906,9951,1771,9480,9880,10219,6115,9424,3913,10102,10199,9835,5484,8432,450,10154,8257,8727,1250,9669,9782,2780,4701,10188,10110,7751,8151,4639,10155,7972,7973,9670,9892,10155,961,9671,9033,9131,8822,9672,9673,5175,576,9168,6119,9473,6003,1766,4500,5769,4349,2605,4338,979,5678,10156,151,9473,4800,9720,3081,9722,4901,10281,2467,10071,8566,8967,10655,11097,10187,10991,11025,11116,11105,11135,10974,11104,9,4424,11052,11072,10554,9959,8173,10886,11092,6181,7205,2079,6820,8507,11306,10550,1774,7048,5531,4510,11118,11260,8970,10718,2169,11045,10483,11053,11279,11482,8565,8721,2056,11099,11449,10941,1887,6,10947,11283,11253,6267,6118,10133,8946,9846,3327,7888,961,11638,11886,10477,11622,10682,11328,9390,11908,1265,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,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,10714,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,11371,8076,7123,8475,11744,11436,11705,4598,223,7641,6658,222,7640,7812,5839,1084,4218,6631,7775,217,8607,8142,6646,5484,7910,9825,7304,2473,8290,5647,4944,961,8681,2913,5175,9257,8388,2455,9449,9378,9601,5389,6971,9377,3029,1349,9810,6642,9545,9835,3549,5134,9929,8539,10240,10002,8765,107,9614,4765,9647,9798,10002,10089,3549,461,10113,5134,9921,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,7019,8222,7761,8845,4109,9195,1662,4796,7837,7834,7835,7836,8441,9297,9552,7003,8851,9614,9300,9030,9960,9925,7641,8617,9548,9879,9897,10056,9525,9463,8296,3989,7634,6726,6849,6971,9890,8281,9488,10526,9085,10265,8948,186,2632,10836,10302,10471,8962,8726,10549,2261,10480,8816,10531,1461,11121,10464,1645,11128,11230,9951,9000,11325,7909,11304,176,9814,8995,10064,8109,6712,650,8512,3849,10656,6571,11089,10636,11494,10040,11644,9993,11741,11219,10938,11324,11455,10548,3595,9993,6876,8388,11457,9634,9802,9909,9342,8828,10060,1097,6550,9771,9931,10161,9043,10126,2897,1953,8879,9044,9993,10166,2830,6774,9093,9843,10125,10237,10282,10297,3465,8973,8613,9987,4156,9336,6953,3647,7576,10269,10468,10280,10183,10537,4906,9934,8830,9557,9786,7602,9342,7917,6648,9789,10098,156,9329,10735,9497,10080,8763,10320,10481,10886,9910,10532,11026,10892,11099,11102,10133,8967,10649,11078,934,11140,11097,11133,11095,7602,11233,8976,10808,1097,3282,6119,10093,675,5792,9283,11260,11166,130,367,11198,9235,11396,9193,11141,7148,5454,11479,10094,11352,11359,11442,7613,11447,9402,10091,1126,1145,2331,4432,5996,8019,5251,3368,947,8220,5956,3875,4178,6768,6388,1704,8547,6218,6223,6521,744,1600,467,423,470,645,9770,9566,5312,8000,4830,4984,5218,4423,3136,4008,1474,1593,8894,9378,1460,1098,4164,4165,89,2760,4395,3370,1234,435,9533,9418,5306,3067,2904,1407,3541,4944,1662,8389,10102,10110,1593,6740,10098,10107,8305,6212,10269,7869,4788,9675,1425,5218,2776,9676,10054,1561,2904,7033,10442,89,661,1092,1318,1407,2904,3094,4165,8241,4301,10913,10983,10999,11008,4160,11009,11006,11021,11020,10142,467,744,1407,3541,4964,5312,8000,1098,4830,4348,1318,1593,3645,3797,5218,5170,89,4008,4164,1561,28,9655,4348,1474,744,9418,11409,10278,11402,1092,11228,4165,470,11252,1092,4984,1198,4940,9378,4943,11546,8995,9838,11610,2824,2785,2778,6443,5306,2904,6962,661,5306,2904,7751,11663,11657,1237,11546,566,4165,3645,2760,1600,467,11485,956,57,9533,10278,11228,11812,3370,3136,6740,6740,7238,4639,3334,3358,3385,1250,10649,10826,1308,1308,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,9921,1052,9450,5839,9900,10228,4405,452,4800,10305,8135,1557,9931,11134,8435,8257,10086,8922,11352,9871,8262,11437,5997,1049,10741,11101,4362,8377,11519,4720,6806,5227,10142,10343,11140,10532,2820,11119,2779,2816,7982,9543,8822,10935,9133,10891,7170,5839,3874,4146,10302,6953,9933,6894,8306,5602,3536,11271,9390,11476,11480,9669,11413,11477,8815,9670,9671,9672,9673,9386,10394,4405,9936,993,7135,10505,2117,8947,9463,10339,10653,10649,7003,9536,10683,10518,10002,9900,10368,4769,5770,4801,7160,2521,2522,5647,10526,11266,8223,9116,5839,10368,10974,9983,10904,11443,11442,9669,9670,3849,3564,10719,11101,10316,10736,3282,11657,11673,10093,11451,11659,11658,11660,10375,11714,11314,11681,11703,11494,9471,41,9897,582,11620,10886,11346,9868,9942,7027,11486,10840,8108) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC