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,5995,1038,3428,5996,2160,6103,5321,233,4355,228,6315,4056,5421,2194,1998,6361,1453,6633,358,6100,5885,1591,6709,6769,6312,3921,5914,1402,6718,6588,4088,5081,5371,4131,5331,6635,6595,6315,6010,6595,1765,5286,5321,3921,6639,3941,4088,4539,3896,4950,4463,4773,4596,2025,1371,6863,958,6703,4670,4739,4740,1461,4878,3625,4875,2337,4136,7016,5373,252,3885,848,6792,7363,1521,5081,5142,3542,947,3890,4131,7550,5995,4185,5542,5906,2889,254,5247,5322,3216,6315,320,5331,6796,3026,464,6700,6866,5331,1462,508,6121,1230,924,4218,5994,922,6364,6382,5956,3542,6130,1645,7304,5996,5909,3037,4109,567,4834,1557,5088,6891,1325,4450,405,2117,1998,421,324,4029,7547,7143,4690,2729,4432,3054,5763,5735,4986,450,4320,4659,4722,2246,6809,7834,5904,1073,8093,7592,7837,7835,7836,1461,8103,8151,7907,6828,4765,3549,7910,7359,637,3014,501,6838,5602,1327,7919,8092,3872,4901,3904,358,435,4056,1119,1121,7861,1215,4983,1029,7812,7783,8617,4731,8629,8793,8745,6642,8555,8837,8836,8869,4566,8919,8840,7037,1461,4730,6397,4950,36,768,8169,9030,9075,9073,8933,9074,9072,9164,9163,8841,9096,9072,9074,9216,9244,9243,9242,7815,4395,8441,5088,5236,9281,7899,9344,2253,6310,5046,4061,6986,1038,4339,2847,8839,8031,8547,7559,9460,9456,9459,9464,9455,9454,7354,7587,6713,3261,6782,8089,2882,1516,504,9497,7833,9479,9546,9757,9647,9463,9814,9635,2989,7804,8970,9810,5881,5885,7548,7873,6842,8280,8291,8818,9038,9334,9078,9614,5915,7140,3395,9345,8978,10004,8504,9990,9637,9888,9897,9910,10113,9900,10114,6002,6981,9967,9603,10046,2446,9753,9788,409,9319,10039,9828,10064,9558,10060,10088,10182,10087,10261,9987,1385,10109,10104,10260,10267,9354,10237,10358,9769,10258,10183,1142,9180,9185,9299,9506,9801,10063,10259,9389,10229,8910,9406,9275,10210,10528,10121,10547,10549,10297,10343,10364,10380,10320,10319,10318,10564,10699,9959,10090,10480,10187,9919,10820,10700,10471,10505,10741,10847,10569,7131,10655,10668,10712,10977,10967,10972,10893,10702,10935,10679,10538,10119,11044,11090,11041,10971,10416,10715,10719,11021,9336,11103,11104,11042,9615,10174,9969,10440,10780,10785,10737,11106,10754,10734,9617,10778,11028,10749,11129,11135,11162,11163,11134,11089,11237,10536,10842,11126,10876,11258,11230,10261,10875,10878,10865,10086,11282,11220,11272,11315,11339,3493,11372,11382,11361,11121,11397,11234,11127,11446,11450,11381,11131,11386,11271,10236,5795,10837,11487,11423,11213,11377,11359,10938,11621,11551,11606,11379,11612,11703,11698,11646,11724,11440,11230,10663,11593,9896,11800,11669,11678,11850,11872,11363,7144,6104,6809,6845,3162,5996,4049,1453,834,6315,6642,5636,2118,5764,6709,1576,6348,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,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,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,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,9921,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,6192,6113,6010,4985,1516,6001,2168,6559,4682,6118,5893,6158,2269,6154,508,6011,566,219,5222,5321,1425,5917,6782,6362,1603,3824,3856,4417,4617,5011,5208,6785,1398,2911,3216,6780,423,6136,6806,6691,6973,6972,6947,255,1370,6156,6157,5222,239,6059,7299,7034,7023,7303,6795,7206,6633,6981,4788,1029,6337,947,1126,5334,1325,4432,466,3549,156,566,5582,3760,311,1738,464,7904,6192,6813,4218,435,7833,1245,4385,1207,2776,3761,7928,6163,5542,1532,1600,698,236,3131,8557,5011,8614,8535,8554,8550,8614,8305,1029,8547,2331,4983,7861,6712,7602,2737,7599,5143,8871,7928,6778,156,3875,3046,3531,4730,4765,5893,6813,5915,308,6156,9448,7982,8151,6644,6831,6767,7938,9403,9307,6829,801,7913,6953,6894,665,9889,9926,9933,93,6163,8284,9665,10067,9953,9721,10046,9722,9449,9545,9603,10118,9754,10055,10145,9723,9835,9836,10112,9942,7812,10679,10113,10501,10512,10495,10628,10626,10697,9724,10237,10353,10358,10366,10482,10608,10497,10610,10876,10715,944,11330,7889,1886,11291,10294,11287,1210,10877,11101,10938,11136,10935,11134,11200,6898,11232,11347,11290,4899,9558,11233,10684,10733,4603,4602,4600,4599,11358,9728,11364,7019,8222,9993,11219,11324,3595,9195,9552,9925,11027,11112,11115,11127,11435,11552,11738,11449,11447,11456,11586,11236,11460,11551,11372,11622,11825,11371,11360,11699,11773,11524,11135,11774,739,3850,5331,1433,3368,320,5764,3715,3542,6792,1559,6117,5373,6635,4131,5331,6559,6782,4185,2294,5349,5542,5142,3625,5717,3368,6713,1038,1299,512,2160,5215,511,1521,6315,5020,6639,1347,3037,6693,6595,6548,3080,5339,2933,6858,922,608,6154,24,6700,5247,223,5885,6367,3026,3904,5875,36,6584,30,239,6674,748,1536,1576,736,585,104,510,6713,6560,1253,6792,504,754,3474,6862,3863,2387,768,1067,1113,1347,1872,6793,1523,7138,4028,1526,1569,2381,4194,321,2660,2419,7005,2639,1055,5331,4126,511,4061,6188,2299,1647,5764,3413,1727,5614,5817,4362,6845,955,7358,6809,6104,4923,1568,741,3419,1823,3561,3933,2976,3701,6699,3936,967,5236,2590,7839,4553,7012,1134,7025,7883,784,1920,7759,3117,7780,3134,7840,3129,7876,7760,7712,7859,7879,7821,7858,7855,6981,6315,4624,7865,7856,7719,5543,6734,2882,6697,7920,7896,6679,4258,4460,6986,5545,4566,7126,252,1268,4969,7354,2244,7919,8089,3100,4128,8000,7156,4901,6684,4082,6337,6314,4730,1073,5047,1439,1127,1298,7550,8543,6131,4886,7840,6740,7238,8220,8215,8225,7827,5739,7559,6117,6365,7981,7138,8900,1311,6945,3195,6478,4432,8888,8902,6136,2018,360,1698,8901,3542,7605,8146,1521,156,9036,969,9200,9279,36,9116,739,2387,6792,6713,9329,9244,9372,9322,9374,2944,3542,9273,7580,7138,1349,9258,1215,8306,6337,1521,6942,8925,7038,8681,9018,9051,8698,9050,8687,9109,4023,1432,8031,1257,9406,7005,6663,6664,4652,8514,8795,8805,9363,9454,8910,9402,9391,9333,9421,9335,8978,9346,9366,9308,9197,8934,9248,7839,2514,8817,5180,9041,2841,2246,4679,4504,609,7354,8254,1005,9249,1586,8935,9471,3549,5334,8794,7910,8547,8955,4765,6780,4194,5215,1576,2117,8915,752,2387,8193,8019,254,5516,4538,6684,6642,5121,9459,2709,4405,2669,428,9600,2123,5602,2118,1762,9604,9606,5379,1681,1572,1498,6874,9627,5640,3613,4099,6867,4056,3457,3964,228,8629,1080,9038,3023,9638,2743,162,9455,1121,9634,7581,1119,9335,5046,9653,9657,6663,9635,9383,9677,9665,9345,6740,2530,6792,510,1349,2389,4338,2766,2944,972,1245,6354,6849,6858,7238,2137,320,1095,2253,6644,1070,6732,5142,5134,5707,6730,7304,1268,4983,4128,3701,6693,6857,6315,252,2253,4099,2244,5657,4401,6962,6364,7303,3046,1000,6190,3244,322,7239,5582,2467,7146,223,5582,7598,7600,1073,5602,464,6633,1029,7631,4079,4432,5678,6671,4349,3595,4437,6122,5421,4218,5770,5371,5576,1462,2342,1343,4570,3863,2455,1461,5576,2269,7307,6981,2869,6809,1351,4535,6809,7020,834,501,7020,5657,3850,6709,2269,1764,7359,4446,934,7546,1038,6599,698,4566,452,3492,6845,6721,156,1271,6723,446,5419,7604,924,5647,1973,4178,2932,1200,4362,5148,766,2932,4860,2006,7160,7631,1993,3830,1439,4901,713,5995,1453,4796,6367,6103,754,2029,5269,7840,6168,5376,6981,7592,6740,7554,7833,6155,7754,1345,7751,7756,6131,5484,4860,1371,3941,3860,5996,2976,5764,6315,5020,3561,4566,252,793,1402,836,4234,5321,3100,5088,606,5764,4969,5286,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,9921,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,1439,7268,2776,5143,5764,2160,6981,4061,501,2706,8031,1038,7919,2976,466,4901,5247,1207,4730,3803,3037,5543,2381,4766,4624,6809,6845,6104,2882,5251,739,3368,2590,2419,8146,36,1298,3396,7036,4648,6861,8514,7839,5739,1127,8910,8687,4460,6862,7896,4665,8010,5997,7981,946,7920,2294,3080,5339,5545,4258,1347,1253,6945,661,254,6136,6314,7025,5215,4886,4950,4969,6397,9366,180,6595,2933,8629,9402,9079,9554,9639,9725,9290,9807,748,9811,7760,9925,9945,9769,9448,9459,9677,9730,9680,9768,9764,9421,9930,9933,9045,9910,10003,9038,9779,9675,9749,7883,8999,10212,7839,10668,90,7632,10685,6243,6250,6256,7617,7618,8502,5066,6872,6898,5247,7719,7023,7206,7816,7815,8714,10894,9824,9933,10061,10821,10840,1699,11021,11122,11028,11106,11089,11126,11123,11020,5693,5854,6095,6248,6252,11426,11442,11443,11107,10679,5988,11455,11458,11460,11457,11461,11436,11136,11314,11645,11423,11774,11775,10935,11816,11135,10784,5995,5995,7878,6981,1038,5764,2976,2381,2160,1215,7967,5764,5247,7919,4730,3037,4766,2117,5602,4563,4801,4079,2882,2882,4983,1325,1325,3715,320,2658,4185,6986,4769,5484,3941,3941,5543,2023,4566,9334,6139,2882,5997,6155,1108,314,5908,6102,5256,2113,3037,4730,4766,6104,5995,2324,5247,5088,6829,931,4412,1825,5883,2156,6633,1052,4898,5962,6825,1038,6006,3358,6364,7878,4555,7276,2845,6741,8095,8064,7262,8022,4130,2594,8078,1010,8403,7719,4770,2182,8141,8516,8306,1645,4728,4254,1257,4767,4233,8578,1559,5373,8722,8552,8289,8639,2989,8,3989,6154,7374,8841,8095,934,8587,8915,3262,5763,3297,8144,4337,8615,2381,7919,8484,6907,8836,7904,5065,5066,7834,8580,7836,9058,4670,9305,9318,9269,9254,9333,9387,8220,5267,9421,9322,9365,9459,9509,9338,9479,9403,233,7928,6103,8628,4800,9366,9526,9641,9656,9763,9770,9028,9136,9527,9406,9798,6857,9648,9347,9634,9871,9930,9942,9750,9947,2985,9030,3479,9968,10008,9950,9935,6738,8776,10060,9978,10011,61,5477,3933,10061,10079,320,1268,1536,3162,3612,10108,10172,10128,2093,9951,9954,609,9439,9045,9032,7833,2137,10210,10228,9998,10221,1815,10303,1816,9214,9059,8891,3701,10354,10338,10307,10366,10375,9832,10351,8139,10482,9245,9807,8828,10523,10481,9373,2025,10615,585,3904,9043,10666,10648,5795,10258,6700,6548,10569,10244,10568,9904,8900,9831,8837,10548,8925,6713,10870,10880,10895,8888,8901,8902,10857,10767,9086,8089,10702,8800,10911,7828,10619,10620,10705,10621,10899,10142,10903,10935,7807,7222,9270,10086,10094,10056,5170,3904,6354,3073,2698,3070,10134,9603,9475,2271,986,3351,3429,5631,10132,10133,2707,1159,4901,10210,10018,780,743,772,4406,10277,5131,4653,10285,10286,802,1441,1160,1110,10205,3825,10287,7758,7858,6852,7865,9353,7864,1915,2654,1277,9607,732,10207,10241,10242,10104,7856,7855,7221,3731,10130,10209,10148,10344,10345,2912,10374,8946,10376,8919,10358,6902,141,10243,10373,6163,10065,9406,9511,3731,8910,8095,10416,10543,10400,9910,8813,10399,8812,9252,10401,10479,6901,9929,10120,9937,10362,10476,10530,9769,10046,10660,10661,10662,10112,9386,10633,9748,10119,10118,9761,4240,802,5321,2657,10709,10708,8687,10710,9253,9251,1835,1190,1177,9466,8387,1176,7554,7754,7755,7756,7927,8509,10528,10062,9770,9222,9253,9251,10787,10857,10523,10395,10836,10814,10870,10396,10358,10569,9614,10632,10244,10634,10917,10918,10568,10635,10584,10583,10636,7029,10919,2912,7674,141,3351,7856,9512,9531,9532,2658,9551,9566,9569,9570,4199,9568,11028,8615,9528,4624,4730,8902,446,10212,10895,8888,8278,8276,8275,10657,10913,10911,9981,8799,9987,10141,7221,10205,10207,9277,3428,7239,10066,10165,10236,9402,8031,1253,5545,10413,4969,9454,11027,10414,7636,8095,608,1368,10549,10837,848,10512,7580,4766,9391,9982,4233,9571,8252,3100,10649,11112,6163,11141,8842,5013,5154,10113,10114,8629,8837,3029,228,10063,11142,9904,10967,11102,9543,217,10087,11219,11126,10938,11217,4337,6863,11202,11122,11220,11100,11084,11123,28,11106,11268,9638,7550,10397,11180,4984,645,1917,9950,11219,10784,661,10127,744,6731,57,467,1092,89,4785,4536,2873,11374,2871,6730,4329,6692,4882,6776,3100,2317,6185,11330,5131,4406,11228,4046,4048,4045,10377,8147,7057,7857,7003,6736,4049,4050,6741,2033,8517,6705,4136,7016,9251,8812,8813,9252,9464,11302,11235,2639,1398,6678,7270,7251,7251,1126,6595,6447,2849,7856,6595,7296,7856,3595,6795,7296,7904,7714,7879,7271,7101,8053,8058,8034,8076,8040,7119,7931,8046,7878,7548,6155,7946,8284,8209,6235,7273,8373,8418,7840,7878,7879,7115,8481,8573,5320,8220,7280,4878,5320,8720,7971,7275,7297,7971,8761,7298,8419,7670,182,8683,7761,7547,182,3895,2522,8682,8618,6936,6938,7675,8698,8739,8933,9030,7124,3080,8412,8908,8580,7103,7083,4258,2605,8847,9134,8358,6354,9336,9134,8042,9244,9329,3070,9322,3073,1349,4460,9071,7087,9449,7239,8064,8458,6514,6514,8405,6986,9312,8832,6700,9367,9093,9777,1381,3760,8436,4299,3541,4160,8681,9958,9874,4178,2253,6619,9143,7368,1770,1765,9932,10109,10087,9603,8724,7113,9603,7649,9200,10008,1767,1771,7692,7690,7686,3172,8896,1609,4805,3071,3875,8220,7020,3590,1766,6740,1688,9963,3282,9769,10008,6828,1787,6642,7752,2261,8220,7973,7751,9146,2915,10379,2349,4847,4847,4728,675,1785,169,9951,9486,7368,5245,9951,9082,9026,8255,6658,9932,2474,8956,9009,3908,2337,9384,814,4330,7203,4234,7059,6624,9879,1357,7203,814,8856,8855,8761,1698,1308,1776,6030,3250,1766,9873,9833,3893,8793,1461,9344,6715,7235,2784,7246,9893,6427,9052,9115,9052,4566,1165,7903,3380,1215,446,8942,7823,9824,10742,4535,10475,4535,10475,8742,10228,10965,6728,6700,8080,10737,3860,9676,8669,576,9496,10929,4947,7598,9547,6416,10422,10381,6764,10264,6751,544,6151,6763,8160,6493,7705,573,8158,9859,1664,7605,2605,10416,2270,10742,8394,5484,10356,7751,10789,11289,6776,5487,9368,9367,8323,4730,93,11268,10836,10056,9300,8082,10768,10767,11719,11781,8910,8514,10722,10722,11670,7895,10543,9406) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC