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,1766,5995,446,698,5576,6160,5995,2491,3069,6272,3384,5295,4795,1656,3385,2491,3401,5717,5175,6118,952,6103,3184,2998,2696,6453,5996,6474,6472,6460,6465,6475,6740,2876,6468,222,156,6800,6390,6873,7104,2946,2453,7639,7938,7595,665,8281,7239,5545,7773,6493,8558,7674,7846,8724,8700,6498,8740,8682,8583,7840,9109,9054,8240,435,8913,9249,9249,3850,7647,9529,9619,5512,8953,8953,5996,637,1402,1998,6620,2682,6780,5907,6621,5371,3860,240,409,698,1029,1248,1410,6103,6135,4553,176,5175,5252,6122,6595,6154,2992,754,585,3080,6312,4131,1398,1433,6845,5817,5339,6104,4258,6117,1953,3542,466,4199,5912,2294,608,6862,4460,5371,6870,739,1347,7126,228,3492,1699,2748,5339,5142,2337,3625,36,1461,3542,1253,4535,4092,6124,5545,2989,3368,255,6557,4199,1624,1559,5647,1371,5576,4046,3241,501,1351,2706,3989,834,2632,1461,3830,6940,2915,455,255,2530,6849,4385,5362,3479,2261,4125,1532,1826,7019,4770,6845,6809,6366,4254,1520,5567,1645,6740,6588,7238,6658,6796,5769,6394,7548,5567,6834,4923,6809,314,3863,2473,4769,223,2454,7635,1769,5068,7374,1771,6552,6561,7976,7976,3893,4901,1371,4769,4100,4513,6595,1872,6102,566,7138,2590,1812,5544,7833,4131,4983,7156,6635,2261,7016,8031,4220,2393,617,8442,7250,7250,7840,2761,7064,675,1487,3392,3803,5094,7069,8902,8900,8514,3957,4872,9036,4349,7998,7654,8175,4510,3715,9220,9214,7985,2393,9278,9279,9049,6154,9258,9258,7563,7563,9406,9377,9444,9444,9527,9363,5545,7655,7655,7655,6774,6774,9614,6686,9730,9258,9800,9656,4800,4405,6740,4535,4395,4079,324,8610,8610,958,6843,3702,6809,2753,7158,1516,6785,2328,6941,6001,5995,3550,2389,1029,6947,308,2932,4337,217,4639,4769,7101,3261,7548,5421,1351,6740,5576,834,3197,7022,7238,4109,1461,223,501,5454,308,6780,4701,7837,7903,7835,7775,7836,7761,7827,7938,3549,5334,3698,7838,3647,8222,1662,7019,223,3346,358,3754,4535,7239,8390,2029,5763,8547,8611,2006,6365,3554,8358,8561,9300,9297,9880,5719,8828,8768,10008,6561,6006,6000,1425,6658,3555,3949,6595,5995,1591,6587,6583,6978,6962,6586,6588,7019,2145,6120,6103,6264,1558,2473,6710,7258,6445,7093,501,6713,7166,6098,7871,4209,3904,6785,3604,3595,8349,8537,8342,8620,8620,8683,6583,2992,7753,8514,9104,5052,8088,4652,8413,9339,9130,9348,9563,9579,8053,9539,9366,223,6971,10212,9741,10307,3904,8739,10513,9945,10691,10690,10689,10588,9054,7675,8910,10629,11025,9198,9162,1232,11222,36,6710,2033,4223,4860,501,2932,1461,766,4798,5070,585,1690,4796,1038,3989,3037,2706,3904,6863,6693,3595,4061,5148,4969,2632,2261,4234,5995,1325,3830,1215,5799,1257,3241,4209,4656,5179,3080,5286,2657,739,36,6779,6679,4886,3964,504,446,228,5543,2976,3493,5331,2294,7143,608,6858,6595,1699,5795,7126,4258,1137,5817,1253,7709,5545,4460,997,5339,4178,3059,3080,4635,2933,1347,6981,5207,5142,3775,7019,6632,5193,3525,6986,1917,4566,748,1347,3100,233,7582,6842,3542,7761,5373,2337,7883,2894,6010,6713,4131,7920,1521,7759,7839,1369,215,969,2025,802,7238,8193,6740,5236,4987,8548,5996,6713,7138,7760,1699,6102,5995,6104,4395,5339,5817,4639,6364,5906,6103,5916,5688,1016,6713,4800,4827,3542,3625,3474,5764,4784,4087,6858,6691,6782,6829,3554,5175,5965,4424,1755,1764,104,3574,6951,576,609,2849,5763,4510,4087,4046,1345,6809,6979,2300,6731,458,6845,7358,5961,1988,3719,1993,7214,7019,3704,6795,7839,4224,7605,7890,3823,4774,7810,3908,4659,7920,2643,8196,233,1511,1984,8548,7883,7216,8144,8031,8514,8089,2294,4258,222,2989,6006,7804,5252,1984,1458,1084,8999,8108,4452,1490,582,3492,1823,9028,9212,9213,9079,3712,8224,4613,4704,1300,2849,9116,4082,4136,9372,8559,2491,8358,582,5961,9258,9375,5636,207,8274,3890,3891,3893,539,542,3896,8271,3882,3892,3894,8273,3884,5567,9937,1253,2933,5545,4178,446,3889,9377,9799,9212,535,3244,6642,6891,4082,10000,6858,10228,539,10243,9438,9437,10181,10568,385,389,8858,8789,8515,2356,380,10354,8787,8005,4087,3401,3990,4613,8534,3474,9439,9214,9930,9648,10120,9680,9764,4046,4411,1490,4049,4050,1973,6738,9823,3493,6876,11027,10114,5175,11298,11020,11235,10674,6591,11339,5207,9243,11495,640,5732,2023,6023,2221,6034,8941,9405,7374,11359,984,11413,538,390,6066,540,532,528,11353,6894,5262,6768,7897,947,6658,2005,8866,8866,7420,7535,7535,4769,5770,8255,5567,5024,5484,4094,5769,587,6631,8196,7256,10731,5858,3043,5068,9442,1993,378,11328,10348,11400,1153,9817,9819,9820,9818,10095,8229,8371,8712,8571,7261,461,8721,7287,7861,7088,7086,8040,5371,6190,358,6833,6162,2635,52,6312,801,6843,3966,6794,6588,464,6644,6366,6135,6130,6168,6155,6177,6177,5881,7238,7238,3262,2520,3550,6740,6349,7238,7238,8220,4597,6813,6725,7775,3395,714,714,6766,7783,7783,2029,8143,4801,4801,217,2261,2522,2992,3888,6493,1070,1520,6710,1768,5331,6740,7238,377,6644,6644,4597,5215,5215,3465,8220,8220,8271,4218,4218,7928,8886,7985,3894,8836,8836,272,3165,7840,7840,6740,6740,7238,7238,8220,8220,4639,4639,4178,6140,6140,7976,1591,4395,4395,8816,7879,9300,2967,7238,2992,3860,1537,7304,4720,4405,358,6010,7869,8109,6844,501,1461,6726,223,8358,6733,6190,3337,8485,6740,7238,8220,8514,4061,6690,8659,4401,322,1591,1070,4983,2145,3850,7546,2933,7904,6768,1917,2546,8512,4128,6130,5893,6157,5070,4659,1381,1402,6103,5542,2137,675,1016,1038,946,5331,1954,6779,2032,2677,1385,5247,6642,1439,6364,4985,3908,6986,7101,5764,7097,4898,5142,7074,7092,7075,1461,1145,6118,7298,7019,4424,7261,7289,7239,7267,7273,7271,7285,5961,501,7158,7272,7208,7036,359,4079,7296,6740,7605,7579,7797,7245,7089,2674,7269,7097,7906,7937,2976,7835,8093,7264,8041,8144,8057,5764,7287,8169,7266,2046,2389,2025,1461,2389,8187,5142,8052,4563,7939,7154,4624,8293,6740,8423,2381,8411,8237,7982,2261,8258,8305,4639,4766,8480,8483,1298,8417,1917,7994,8079,8459,8853,8062,4395,2913,8894,8769,8426,8810,6891,8955,8306,7037,7761,3346,8763,9083,7957,8651,7659,7239,8201,8658,2882,8547,8736,7210,3261,9308,9261,7775,9160,8055,6589,7900,5455,8736,6792,8055,4131,1029,9277,4597,9561,2052,9580,9038,1453,9647,4983,9562,8477,9446,9754,4079,9834,9444,9344,9136,9313,9258,8046,9367,9544,7073,1272,10009,10027,9450,30,10025,9821,9757,665,9316,9594,9954,9530,9257,8711,10056,10123,10261,10274,10125,10297,10144,8472,8019,8052,9575,9161,10512,10535,10353,10364,10182,9999,10356,10451,9370,9091,10541,10570,10694,10693,9158,9509,7261,10767,10039,10145,9259,10582,11134,11230,8062,10476,11116,9594,11337,11371,11671,11542,11651,11654,11225,10399,11476,11538,10401,10030,11767,9999,11805,10814,10582,11802,11794,11890,7599,1073,7110,7121,4199,952,6632,7674,6183,5947,4234,2522,8040,2706,7261,7024,737,4405,2300,3236,3165,217,7147,501,9554,10733,10644,7772,510,11414,5996,240,7304,3860,7897,6766,1537,793,8281,7928,8223,5770,2029,7175,1343,7391,7160,7833,8296,7205,8503,8818,9085,8464,6122,8512,9681,8839,8437,1343,5995,5995,7878,6981,1038,5764,2976,2381,2160,1215,7967,5764,5247,7919,4730,3037,4766,2117,5602,4563,4801,4079,5837,2882,2882,4983,1325,1325,3715,320,4185,6986,4769,5484,3941,3941,5543,2023,4566,9334,6004,6235,1151,4742,5279,2033,744,3368,5148,7833,5251,2932,5576,4701,9221,8303,8064,7083,7840,7878,7879,7104,7715,7099,7082,6110,7096,7278,7249,7107,8065,7110,8049,7094,5770,8070,7960,2635,6544,8452,8384,8381,8393,7931,7895,8406,6131,7105,7654,7247,8407,7112,8349,7124,8041,7266,7106,7261,7717,8084,7246,7100,8461,8464,6968,8409,8407,7670,8408,8644,8641,8394,7277,8396,7153,8083,7266,8203,7251,7112,9053,7286,7666,8406,7258,8430,8404,8782,8473,8072,1343,8683,9247,7082,8470,8644,8047,7085,9259,8034,8460,9225,8398,8462,7252,7095,9205,8832,8431,7943,7115,8475,7084,8395,8082,9573,9578,9579,7253,7272,8033,8473,8370,7589,8635,9204,7147,7655,7123,8066,7093,7076,7254,7280,5947,2934,5719,7708,8909,8053,10659,10586,8407,10675,10690,9386,11124,10573,10859,1990,10773,8781,7143,8547,7903,6642,8952,8358,8514,2029,8948,8922,6740,7641,8220,7238,8912,3850,9030,6849,6845,9300,6104,7019,8780,446,9212,8520,9366,4178,9386,4178,7833,9366,186,8306,5995,9159,8816,8169,9936,10056,10126,9079,10240,2925,2467,228,8358,223,7374,9125,5484,8780,6891,3949,8255,6642,9340,6367,4801,9300,1349,4450,3784,4259,3531,5400,4405,6855,222,6740,4259,3784,4450,8358,10627,6010,2033,10056,8535,2932,4639,9603,10836,7738,1666,3784,4450,11101,5371,3783,4259,4535,3428,7374,9340,8491,4395,2389,2399,4519,5602,7374,10649,8683,5070,10649,10764,10892,8714,2594,5484,10257,1398,2594,11402,11497,10257,11324,11315,11281,11497,501,6158,5070,1461,675,4801,2753,698,308,4765,6156,6695,6348,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,9422,6103,2627,2005,4234,6971,4639,6832,4144,7957,2989,8547,7149,4659,7115,7654,8306,7252,8092,7253,2117,9701,4563,6264,9538,2761,2467,7940,5912,4399,8629,7946,4566,5193,5236,4656,6986,1327,8031,4061,4405,6560,6559,778,10060,9751,9758,9221,9750,7106,8395,10211,10233,7254,1349,10227,10237,9257,8391,10244,10236,9132,1521,8089,9353,7017,10245,10226,10315,9935,773,8777,10359,2261,10541,10550,10587,10567,10588,10586,2079,10666,7121,10524,7716,9870,10743,10807,9831,8211,7932,10820,10239,3542,5763,3715,7895,10976,7125,11021,11025,9259,7125,10977,7087,10904,7252,9900,10749,8047,10899,223,7265,10747,11126,10765,6845,11115,8030,6104,6870,11122,8741,2294,1253,5545,5339,1347,5817,3080,4258,7883,4460,608,2933,6858,7126,10246,10869,1699,1830,8500,8668,8206,4395,7920,7839,10350,10692,6832,10690,7280,11679,9206,10659,11540,9959,11558,11785,7792,11402,11496,7778,9889,10949,10366,10585,11528,8891,10702,6,11704,8477,10027,10863,9012,9006,9049,1343,9783,8836,3702,9053,7655,7655,7906,8077,9510,7668,8207,9386,9407,6631,7906,8955,6591,3282,9320,8422,9577,4339,9659,7669,6629,810,6693,9292,5376,7159,1685,8794,9821,2913,9664,9813,9936,3604,8742,1992,9354,9479,1967,9049,9933,9985,9526,9594,9594,754,7765,7880,2253,3165,8257,7874,7970,2473,2915,4784,4701,9079,5380,9365,7218,4639,217,9904,9938,9937,1257,7903,9525,9647,9900,9666,9922,9959,10000,9931,9366,9052,8948,2033,7143,5647,3830,9027,8793,1766,9829,4405,8087,10835,7106,10629,10919,10965,10992,11020,11068,11092,8792,10625,9082,10659,10694,8414,10572,7289,10692,10773,10689,11274,11276,11277,10906,11629,11628,11632,11652,11631,11633,11712,11630,11631,11712,11630,11685,11711,9509,11758,11743,11713,11528,7930,11518,11654,11651,11653,11779,11780,11782,11777,11778,11797,8202,11793,11795,10770,11632,11671,11798,8460,11756,8080,11802,11801,11333,11865,11469,11367,9095,11675,11368,11794,11369,11781,11883,11674,173,57,6809,10236,4406,4406,10061,6104,10212,10212,10061,8864,8864,7516,7516,8762,2182,2182,9195,9552,9925,1645,1645,1645,1645,2989,8547,8810,6904,2117,40,6870,8143,9547,7218,417,5822,7597,4801,4985,4405,9460,6979,4563,6264,2467,2761,450,6205,9556,7926,6895,9926,4598,8482,9871,1327,9890,7974,2113,1662,452,8626,223,7890,5,7872,5,10060,9787,8135,10267,5763,2644,124,8648,9553,4607,11025,10240,9546,10976,2032,1823,11127,217,10900,5262,8206,11256,8169,10986,10977,9557,8967,222,9046,130,10080,2200,3536,934,11621,10448,4144,7773,10433,4405,6740,2520,5371,8489,4639,7238,5484,9299,7222,9270,10086,10094,10056,5170,3904,6354,3073,2698,3070,10134,9603,9475,2271,986,3351,3429,5631,10132,10133,2707,1159,4901,5837,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,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,10480,10651,9647,9985,9959,10655,9389,9387,6633,9031,2506,10466,1029,2867,10914,7602,6905,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,6348,11023,5484,51,10203,1250,10478,10670,11380,10687,10940,8139,9866,11412,8302,9257,10868,2913,5376,8520,4563,11437,2989,8826,11485,9865,11400,9391,2467,11672,11594,180,8222,11661,11497,11658,8050,28,28,7089,8211,7666,8055,8055,7106,389,8460,7261,8084,7266,7075,7241,7246,7713,7151,7665,7100,8395,7094,8065,7273,7096,4178,7109,7268,7268,7080,7654,7654,8034,7076,8438,9620,9611,9745,8401,9622,9746,9621,9748,9744,9719,9259,9675,9980,8358,5484,5602,5995,9258,8047,6539,681,10024,8450,9874,9956,9877,5053,9957,9876,3380,9148,7150,8450,7266,5995,840,4146,5419,1768,9820,9933,9933,3874,3874,5064,5064,5056,10272,4146,2253,2253,8449,8449,10024,9999,9878,9844,9747,8071,5376,5376,4512,7238,11225,11225,7110,4349,10022,1770,10212,3165,11452,9574,8087,4395,3863,8524,11438,10836,10671,7775,4765,9647,9798,10002,10089,3549,461,10113,2164,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,11518,9225,9338,7715,4234,8063,9082,9362,8644,3884,7121,8615,6134,8412,9264,7280,9398,2677,7984,7932,8306,8423,9662,9382,7661,7759,9658,9464,7662,9148,9659,5179,9844,7108,4947,7023,1533,3493,9563,1461,2995,2417,7986,4046,4769,10076,3863,8891,6781,8449,10026,10051,9220,10212,10077,10126,9821,2644,2455,10025,5454,10185,6209,3875,10270,6986,1370,7280,10275,10273,4906,956,7149,9444,10436,10063,9787,10506,9325,10149,10314,8782,9543,10523,9741,450,9533,10271,10578,9822,9747,180,4724,8972,8762,10768,9492,3891,1370,10767,7985,4762,10257,10890,8071,10854,9373,10882,9993,10888,10302,10881,8783,6102,10554,9608,6876,10887,7251,10190,3863,10789,10702,11130,9793,10078,10938,5251,8743,10965,10991,11025,11027,11188,11224,10823,5331,11212,11268,11189,4778,11278,11196,11281,10670,10701,11038,11262,11329,11187,11337,5454,11108,11376,9795,10274,10412,10187,11402,11336,7913,8474,11215,10862,11455,9199,8423,11228,11524,9417,9308,11331,10839,4645,7261,7792,4791,10615,11449,10072,11511,4355,11633,8721,11302,7986,9817,9481,11628,11484,11700,9993,11038,9649,8366,7363,7094,11117,10818,11629,11760,4401,11797,3883,11758,11444,10891,11776,1371,2677,10360,11553,5331,11793,11327,11105,11763,11101,9398,6904,721,11712,9554,585,8460,10716) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC