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,5837,4056,5421,2194,1998,6361,1453,358,6100,5885,1591,6709,6769,6312,3921,5914,1402,6718,6588,4088,5081,5371,7106,5647,5996,1662,3860,1511,7268,2594,8230,3409,8227,3241,924,275,6743,6390,4659,6133,6821,1167,2263,6209,6240,5566,3425,3896,5883,860,6382,6749,1970,6907,6904,5822,3882,3883,3891,7293,7270,3884,7124,3888,3888,3892,7124,7251,7292,3890,7094,1366,6493,7155,3891,7095,3893,7083,3889,7087,7072,7100,7122,7082,3884,6600,7971,7985,7107,8071,3890,3897,7647,7089,3892,4724,6821,7277,7251,8197,7986,7247,8393,1626,7088,8384,8449,8384,7663,8439,8577,8085,8386,8206,8205,8401,7940,3895,8646,8412,8772,8080,8240,8368,8274,7649,7653,8737,4805,6209,9056,7713,3881,3883,4220,8269,5454,8468,7671,9053,6863,8461,4233,8271,4209,9132,9402,458,5484,3894,4519,8893,4800,7985,9481,5777,4690,450,1569,9322,8257,9418,3244,9915,9934,8268,8644,7108,9417,9793,9367,8229,10078,5484,8398,801,4185,2179,5790,6181,788,2085,4683,5209,2288,6240,3197,3169,2302,6175,1885,6896,6832,3250,7154,7086,1271,7081,6890,6361,7297,7285,949,2113,3172,7572,5564,359,7589,4639,1185,7254,2775,7971,324,4684,6769,2266,1381,3732,7944,916,3744,228,2677,6691,2677,5088,3904,4082,6696,1347,3080,6774,5817,2294,6858,6863,6693,1299,4724,6793,6821,3612,6809,2262,739,608,6845,6104,6006,3115,4432,4566,320,3701,3719,7592,4652,1699,1349,4778,2451,1073,2841,7839,4460,6732,6209,4258,7946,7081,7265,7268,7971,8058,7069,4029,7154,8211,8044,8058,7244,8288,8429,8361,8078,7080,8403,8209,7294,8713,8400,3066,8469,6650,8207,8402,8468,5947,8839,8772,186,8195,8284,8876,5936,8281,7913,931,7884,801,659,3647,5545,971,9249,5961,9141,6069,7718,8468,8408,1163,9560,9743,5956,9458,9480,2329,1906,9028,8460,5460,9875,4710,9874,9648,9876,9877,9878,8445,9648,8446,10275,10270,9132,9133,9619,9620,9621,9622,10575,10078,9748,9793,9746,9747,10292,7671,10947,10948,9609,9611,9608,10687,7262,9610,7241,7672,9878,11062,10965,10943,10906,10881,11187,10506,11045,11096,11059,10941,10891,10026,11262,10879,8573,10888,11018,11370,11275,9205,11277,9794,9756,7077,9675,11332,11337,8397,10676,11369,11469,11539,11542,10678,11266,4227,4226,10703,10449,10854,11410,11553,11614,11675,9877,11627,8740,8568,8424,10332,11252,11695,10325,11319,11696,9624,7172,9232,3559,7165,7170,7163,7171,7169,7164,7174,7173,7168,3115,11255,8228,8577,9554,4463,7166,7167,7677,4473,4470,8662,4464,4486,7070,2823,6443,1741,4645,9892,8712,11527,9509,8946,6688,9867,9383,358,1402,5331,6713,6588,6712,5995,3549,6710,6709,6780,5334,5995,2269,3904,6158,6875,6785,5371,4395,2590,5322,566,6130,2677,4452,2615,3908,215,6255,1370,7113,5188,6119,7095,7117,6175,6310,6103,409,524,7295,7082,7238,7023,5995,979,5066,2261,2520,2522,4614,6701,1746,5331,6740,2605,5386,1016,6957,6702,6957,867,7646,7118,7649,1411,3609,3698,810,7076,7081,7116,5763,7106,7109,7087,4390,7153,7114,1165,7653,7599,5297,1685,7122,6272,1266,6623,8080,8042,7291,7269,7285,7101,6709,7096,3550,7808,5332,3754,7932,8049,7643,8281,8077,7245,7931,7906,8444,7967,7605,8541,8552,8304,8480,7658,8088,8435,7903,8542,2389,8283,7154,8721,6870,7284,8706,8389,8266,5371,8628,7068,6359,6890,8290,7262,7124,7294,7289,6656,2521,3644,3359,7110,8207,7661,7675,6332,6855,3725,7089,7276,7248,3014,427,8306,7282,7084,7249,7019,7761,8222,8793,7280,9195,4659,735,7283,6364,7094,9338,7247,1998,4185,7254,7293,7671,8047,8284,8064,8079,8052,8053,8063,6381,9552,9137,8578,9149,8434,3380,6263,1685,1266,8459,8449,8580,8824,8972,4555,180,7904,9743,9793,1257,7588,7721,9614,9800,9888,9868,8166,9959,7239,8581,9931,9933,9030,9386,8725,4639,9936,9950,9349,8922,223,10040,9951,9973,8566,10026,10088,9547,10087,7704,9879,9989,9536,10086,9534,10239,8202,10089,10090,10265,10008,10260,10257,10292,10247,1645,10237,10044,9892,8087,9785,10362,10321,10061,10272,9824,5053,5056,5052,5056,10320,10520,10526,6656,10574,10575,10574,10212,10297,10505,10650,7816,10229,6977,10211,10176,8780,5064,10222,10811,7910,10814,4765,4535,10302,10546,10913,10546,10965,10821,10938,10914,10827,10131,11027,7815,10512,10011,11072,10113,11121,10114,6898,7206,6240,10881,10519,10839,10840,6113,5175,665,6141,1533,1073,4199,1051,6158,2913,1050,186,2530,5576,435,3904,6001,1145,2182,2261,176,4154,6962,446,1370,466,2490,5421,3989,1272,1770,1126,7607,6785,6845,1038,6986,6158,8358,8547,431,7265,7661,8947,6130,8047,8034,4068,5142,7605,9558,9652,7143,9959,10060,1769,970,9053,7164,4464,8282,3872,134,10238,2736,9378,10531,9920,9264,7607,7913,2467,8714,8876,9607,9824,8828,11201,7655,7674,10315,7661,6119,9608,11363,11713,11117,11631,11632,7252,11674,11312,10506,11683,5252,1537,375,431,1765,4558,3702,6104,5148,714,6785,6364,6962,176,2706,3337,5331,3989,1029,2029,7019,5516,7034,6365,308,6567,1559,2006,358,7235,7304,6001,6718,2024,5915,2024,5088,5516,3908,6205,5882,324,508,7143,7238,3892,3892,3892,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,6348,3346,3728,7592,6687,7554,7754,7755,7756,7068,7761,7840,7879,8222,7878,7910,5997,7363,7288,176,6984,4291,2261,5331,3647,1461,4452,222,5998,4199,5717,6439,2706,4947,1439,4602,4156,4860,820,6173,4682,2915,1462,6561,666,5437,2182,4395,6875,3493,186,5142,7218,6139,2882,5997,6155,1108,314,5908,6102,5256,2113,3037,4730,4766,6104,5995,2324,5247,5088,6829,931,4412,1825,5883,2156,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,5837,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,7209,6964,7133,7025,6315,6632,6635,6779,4950,6961,7157,1038,6713,1126,6785,8031,8543,744,6117,1869,1600,6857,3941,24,7581,30,6679,28,2590,423,9347,9376,9333,6639,5247,6683,9634,4131,93,9648,585,2882,4355,2160,2381,7156,5764,7615,2419,361,9769,9768,467,9569,9868,9807,661,9824,10004,10048,9471,9942,6171,10055,3048,9421,36,10080,5692,3437,6848,3775,9945,6797,1237,3197,9951,9950,10149,10129,10041,8902,6857,6117,6845,6104,9798,10047,3368,9930,5379,9988,9945,3100,178,179,1461,9661,9648,4136,10063,9928,10229,9914,9634,7354,2018,836,3115,6942,9929,7900,8904,360,10289,10314,773,3341,3787,231,107,9961,606,3657,188,10467,7616,8796,8803,10048,10287,10286,10285,10319,10376,10660,10662,10661,802,10374,4023,10288,10266,10313,10737,10734,6171,10469,10300,4791,5143,5112,9220,10373,10569,5777,10476,10878,10244,8936,748,958,6710,3989,1953,6593,1038,6779,6103,6947,3550,4131,6804,6842,6986,2261,6858,6863,6691,5142,6315,5995,6981,1461,7126,5046,7019,6548,7005,7214,7036,228,7138,6890,6632,6693,3702,7156,7221,7304,7050,7143,7354,6104,3561,739,1521,7758,7760,7582,7718,7614,7759,7596,7709,6856,7830,7795,7869,7359,7883,7804,7871,7880,3625,7896,3609,7875,7751,7897,7995,7992,8031,361,714,8109,8032,7991,8183,8089,7839,8096,8102,6792,7559,8146,8222,8300,7938,8185,7920,8150,8293,8390,8230,8103,8299,1345,840,6642,8483,215,8302,8226,8548,2473,2467,8306,8526,8305,8358,8554,8611,6076,1815,8561,8535,8547,8514,8615,8629,8687,8659,8614,8479,8688,8802,8801,8632,8759,8744,8776,1920,8829,8807,8809,8902,8888,8901,8793,8999,8918,8911,9030,8841,8846,8900,8916,8925,8923,8781,2005,7912,4716,8686,9153,6715,1462,9086,9195,9220,1296,9296,9308,9198,3823,4671,9322,9324,9202,9200,9363,9348,9289,9291,9454,9420,9419,9258,9480,9453,9402,9372,9614,9335,9637,9376,9680,1380,8108,3337,9524,9552,9751,9763,5784,7849,9479,9810,9812,9674,186,9616,5956,9543,9062,9386,9829,9934,9879,9925,9668,9951,9904,9916,9482,9931,10041,10114,9913,9990,10142,9941,10042,10125,10149,10063,10128,10126,10115,10174,10020,10188,10245,10246,10236,10131,10248,10229,10208,10227,10211,10282,10148,10243,10244,10212,10065,10305,10319,10265,10279,9936,10269,10268,10338,10342,9603,10293,10436,10466,10290,10505,2635,10438,10491,10375,10488,10535,10526,10485,10127,10548,10528,10527,10569,10273,10627,10676,10631,5769,10339,10681,6658,10731,10760,1979,10775,10649,10841,3327,10294,10721,10698,10826,10839,10955,10940,10895,10687,10932,10766,10938,10802,11024,10992,10872,10987,10416,10894,10402,9925,2729,5908,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,5837,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,1029,7631,4079,4432,5678,6671,4349,3595,675,7304,3860,5371,6740,4452,3702,6843,7273,7152,7116,7093,7092,5331,7072,6794,5904,6785,2262,186,6139,5996,3860,7304,6845,7991,7210,7223,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,5837,6136,6806,6691,6973,6972,6947,255,1370,6156,6157,5222,239,6059,7299,7034,7023,7303,6795,7206,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,6544,1425,6845,840,8142,4788,5252,2117,4417,1318,2117,3250,423,1831,3520,5305,2985,6845,6104,2780,2785,6996,3070,2518,3555,2342,2374,6999,243,219,1245,5088,6390,7785,7926,7870,7761,4931,7796,6982,7774,8351,4395,7989,7830,7713,7115,7116,7152,6971,501,7878,8048,6261,8503,5795,1461,7761,8222,3059,2709,8924,9362,9374,9374,8584,2706,4861,8506,9831,7107,8251,8948,10265,10306,9748,9890,10555,10479,10577,10862,10937,11325,8208,11497,501,6158,5070,1461,675,4801,2753,698,308,4765,6156,6695,6348,5763,958,6842,1350,5904,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,6130,3702,7832,3029,7906,2753,7160,6588,6157,6177,5420,4140,5908,7144,7088,8041,6740,6641,2029,7276,8384,582,8082,6118,6349,7238,1516,7941,5582,7101,8049,6780,5884,7911,9139,7589,8305,6141,7634,7929,9611,9610,8947,8628,9235,9031,5908,7101,7275,7241,7280,7290,7276,1917,7153,5516,6710,1738,4061,4411,7830,1439,176,7992,3493,3613,7869,1681,2669,2123,8193,7019,7938,1487,4079,7783,6740,7147,6177,3760,5996,7146,7812,8143,7548,7602,8519,2573,2573,2473,2473,1371,7863,7787,4834,4834,1029,6001,7878,7878,7878,6589,6589,6589,3359,5995,8306,8299,4659,431,3402,659,4724,5763,5883,8144,5245,6550,7374,5518,6138,7928,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,6348,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,8610,6904,8141,6193,8141,7584,3425,8279,4559,8560,8063,8058,8639,8445,8046,7714,8575,8653,8438,8570,8517,1029,8306,6785,8151,7143,2729,8721,4983,8389,6155,7287,7089,7285,8399,8206,8447,8446,7268,8444,7766,7672,8425,7668,6123,7112,8361,8141,8050,7273,9297,7835,9422,7834,8362,8639,36,8741,8200,8055,9543,9275,7261,7096,7287,8640,8207,7245,7574,8059,7984,7941,7939,7940,7943,8061,8066,8253,9719,8475,7666,8643,8419,8202,8722,8427,10056,9444,7085,7249,8469,8086,8792,10008,9959,8431,8426,10089,10090,8468,10087,7585,10190,6821,6205,6907,8071,8741,8737,9658,6133,10002,7792,10088,10808,10815,126,10786,10777,9199,10855,10864,10836,10870,10876,10875,10807,7008,7785,3440,11095,11131,10583,10584,10494,10011,10854,10298,1145,8026,10339,10269,10296,7044,4920,4068,2093,9771,320,10292,4862,10072,10219,10273,10294,10211,9338,10142,10061,10291,10041,10291,10320,10164,10078,1308,10319,9822,9277,10397,10548,10060,10548,8610,6870,8951,9472,3417,10416,3647,10242,6795,2454,2956,3418,10627,341,10650,10651,190,10241,9959,8534,5596,228,3474,8629,10532,10611,10649,2671,10697,9202,9273,9403,8926,10872,10909,10951,10758,10839,10879,11126,1727,8870,1647,11121,11028,11072,10786,11140,2334,2454,4722,5765,10651,10718,10242,10798,11226,11214,11239,11018,11303,11104,9551,9569,9570,931,10915,6361,10951,10128,11325,11351,11237,10739,4219,11095,9417,10836,4136,11409,11349,11363,2151,123,11678,11202,11690,11377,943,11736,11661,10730,11752,10480,10651,9647,9985,9959,10655,9389,9387,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,6348,5402,6832,6691,8968,2328,5371,1521,6645,5582,3346,850,4362,6831,1371,5996,421,6795,7602,4798,223,6890,5927,9694,6785,7214,7639,9900,9386,6687,5543,5142,8876,9244,9362,9389,9387,7144,3728,10129,9497,10116,9951,10001,3081,10313,6130,10312,6889,1453,8828,10956,10517,10240,9959,7783,3414,4834,4399,10818,10131,5947,9354,2467,3878,9545,104,156,7613,8219,11102,7920,2447,9828,10850,1308,11365,10269,10649,11290,3908,10666,4984,4424,11136,11454,9838,10955,661,1145,11588,11523,10934,11603,1460,1318,8539,6831,9543,7893,10269,11366,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,6348,11220,11349,10937,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) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC