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,1768,6519,6523,5864,1766,6532,2720,6498,6507,4300,6222,6497,6515,1767,2795,6200,4301,4936,6503,4305,6371,6529,4301,2720,4293,2780,2785,6504,2783,2778,2781,2779,2782,2784,2786,4290,4298,2787,6530,4300,4282,1766,1769,2818,2824,1764,1767,6263,222,3071,2789,6489,6531,4286,6354,3070,2823,1245,6198,6201,6199,6200,1767,1766,6354,3073,7137,511,7299,7300,7134,1767,2808,2803,3888,3885,2791,2820,2801,2802,2805,2807,2806,2794,6546,1769,2826,2827,2828,6514,1245,5576,1351,2869,834,3884,3882,7160,6515,6456,3891,3893,3896,3892,3890,7567,3897,6493,6271,6507,2720,7300,2677,2995,510,6523,6371,6743,3029,7548,6218,6199,6373,6223,6527,6201,810,2522,6354,6546,3070,7751,6689,3073,3071,1769,6750,7599,6746,7870,6749,2018,7753,6751,3889,3882,6599,374,810,379,391,387,6066,384,378,382,375,394,376,6082,1266,7215,7054,3898,1250,4178,5647,7752,6354,1766,7598,7600,7676,7137,7631,6809,4445,4827,4512,6354,3070,3073,3071,6689,550,7677,7168,7167,7170,7165,7163,7173,7164,7959,7922,7054,6985,7752,1767,1765,1769,1766,6168,7986,2522,1741,6354,8233,8232,6880,3071,3521,2389,3070,8272,2822,2823,2826,7238,8245,2728,2893,8294,7787,8432,344,8316,8220,8313,6509,6508,8307,7238,1767,6197,8520,8514,8315,8318,1769,5909,6520,8233,8246,8334,6521,8331,6513,6514,6507,6515,8358,4639,4535,5576,2869,834,1351,1741,8481,6505,6261,3913,3085,8698,8681,3850,5647,8682,6534,6537,4178,6535,8730,8520,8333,8649,601,2170,2390,3610,8342,6641,8596,8691,8814,8817,8520,5996,8142,567,7634,7635,5551,8617,8719,2520,8591,8717,2522,8681,2522,8681,8780,8944,8817,7881,9041,8683,2253,4535,8826,8682,8945,6168,223,9030,4639,311,8358,8698,4834,2992,8175,6691,8727,2925,8232,8551,8681,3913,3172,9390,1232,3165,4178,5068,9736,10297,9390,9951,10364,10238,6971,9334,3646,10353,6209,9934,8514,3731,10164,9084,223,4639,6250,10527,7554,7592,4218,8555,6712,5567,8290,10505,10656,3646,10547,10531,7910,7756,10339,9669,10364,9670,1257,4178,446,5376,222,9543,10865,10654,10877,6611,10296,10786,8306,7636,1766,1768,2932,1351,5996,3860,6366,6725,7840,6189,7570,7762,3913,6726,8109,2889,7635,8142,5551,4986,8390,7635,7020,8297,7840,8109,3029,7879,1770,1765,8730,8183,9030,979,1351,834,4566,2605,2869,6740,5576,5297,834,2164,3029,3850,6223,6223,8301,223,4639,8358,8730,8489,8814,8547,8230,7599,9130,6953,4860,3989,501,5484,8306,1257,9215,5148,2594,2594,7973,7751,7972,5678,7130,9105,6642,7557,4199,7882,772,6691,4940,4943,4939,4938,1461,7556,4945,7219,8760,4432,4936,1770,7752,7188,7186,1992,1349,8031,8478,8698,8816,6354,3070,7241,3499,6718,6691,3455,5927,3898,6751,7705,7703,6715,3336,3702,7048,6587,3337,3337,6584,6584,6367,587,587,525,525,6604,6604,6612,8583,7870,8618,6503,8586,7546,1770,673,8520,2605,9030,9030,1402,1402,9084,8947,840,8826,8730,8814,9104,3598,9060,9319,7295,2520,6700,6700,8949,6631,7273,8922,8922,4598,8326,7270,7270,7374,7374,7374,6656,4121,4121,8154,7639,1746,1557,3073,6688,3071,8824,7670,6138,6138,778,778,1653,3510,7070,7078,7283,6386,7906,8157,3860,7068,8397,2992,8415,1537,7304,2951,7897,7100,8743,7939,7088,5996,8080,8422,7252,7644,7830,5647,7588,252,2736,1533,1210,1210,466,8454,464,8287,8909,8585,9084,8682,7912,4834,4986,3165,8665,4405,801,8816,7024,4834,5995,7304,446,446,8520,4259,5419,8220,7635,9209,8142,8512,840,924,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,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,2164,11371,8076,7123,8475,11744,11436,11705,3409,7107,2843,6483,314,3874,314,7078,6984,8145,3860,4224,2520,7100,5066,6658,7289,7816,7816,5897,5996,5996,2992,1537,3172,7783,4597,8683,6350,8161,2632,1250,7548,7548,4801,4801,8820,7160,8223,8526,8547,8780,8816,1993,6367,8520,6548,6715,924,8388,5717,2399,4769,6621,104,1142,240,8970,6700,6631,9215,840,6006,9229,5484,1591,6264,2644,7144,8821,5052,7871,6774,5371,217,9390,8833,9281,3327,5770,2253,8515,7838,2029,9468,9027,9322,2117,1371,6131,9162,9513,2006,7861,4435,9538,2005,2085,1052,4395,7923,7976,1242,2989,9480,7992,6642,9524,9479,6103,6004,906,9603,3428,9629,317,754,9306,6691,4079,8685,8814,8826,7576,9704,3598,156,1153,9678,8659,9559,9546,9760,1912,3236,6905,4913,7599,9390,9480,4154,9754,6102,2342,8508,2467,6176,9763,9770,9783,120,6977,9782,6602,9014,7640,9344,4563,6652,9762,6623,8352,9812,2843,9830,8685,6841,8292,8544,9006,9879,9865,9866,207,9872,9918,4216,5419,9926,6819,4320,4900,8814,6371,6518,7168,8268,9601,8824,6372,7167,9367,7166,2789,4470,9962,9888,9403,9771,8831,6806,9872,6831,8520,7970,9884,122,9898,5635,4386,9790,9835,2761,10181,8814,8730,4512,2024,10236,6839,8826,7824,7820,9786,5917,9883,9967,9202,10182,9612,9736,9959,9868,2168,6850,8541,8389,9767,9310,9627,9117,5371,389,3073,6354,3070,6689,7753,8088,7752,8822,2999,8172,5363,8627,9037,3071,8780,10519,9870,8515,9496,10685,9391,11074,10868,10552,9168,10041,9295,10672,10673,4510,5872,10961,11073,7130,9838,8972,9215,4639,9950,9904,9993,9904,9993,4801,8290,9951,9678,223,9220,4916,1770,1765,9835,1771,8628,1767,8358,1767,8358,10042,2456,1768,1768,8628,1766,8628,1766,9295,8912,9811,9454,7160,4860,8826,7580,9120,8682,8320,8330,3875,7094,8336,8896,8681,8698,8899,8244,9041,8698,9184,9041,8656,8696,8945,7636,8694,1368,8692,8946,8693,8695,9037,7753,6354,8817,3073,7752,8943,4701,8946,8727,1769,8323,6371,1770,6223,1765,9037,1767,8248,979,1769,6599,1768,7631,6359,3115,3071,8704,1770,3719,8340,8705,9114,507,9149,8174,6354,9137,3559,7808,9278,9383,5297,8943,7753,8944,7752,8943,7881,1770,1767,1765,4716,1769,1767,8276,1768,1245,510,8275,8591,7751,9515,9407,7972,7973,8946,7592,6688,4944,7546,7748,7753,9665,321,9626,9037,1303,1770,222,1765,7020,3073,8943,3071,7963,7881,8944,9601,9084,9624,7772,8618,9867,7770,8585,7185,7771,7187,512,9806,9907,7637,9906,9911,7753,9958,7752,10053,9720,6688,8727,9722,8946,9721,3071,9723,272,6600,10232,9215,1765,1770,10255,9624,3719,344,10254,9720,5484,7802,7801,8358,223,7826,9595,9596,9597,9599,9598,8730,8432,8816,8780,9720,8826,9215,9722,9721,9012,3913,4216,5484,5385,8822,8432,1767,7631,6354,6220,1768,1766,1771,1765,1770,6688,9920,1769,10176,10098,3073,10175,3071,8583,9880,4714,6689,9679,3070,1266,8727,2506,272,6198,5810,9824,7881,7752,10053,9665,8899,8897,10067,8896,6200,9867,9031,8489,6215,8668,1766,4842,4286,6218,4297,6216,2794,2791,6497,2789,3071,6880,675,2786,2785,2787,3465,2783,2781,2779,2780,2782,6443,7868,4304,4293,10258,2778,979,7311,10238,9473,10251,9669,4224,2951,1970,6679,9477,10188,3385,6002,8233,9073,9243,9478,545,8714,9383,9476,529,40,10055,3358,10294,9483,5207,1690,7185,7184,4223,9632,3525,1369,138,7178,7179,7632,7189,4386,7176,9921,9637,1137,7187,6198,6362,1325,10258,10398,6382,10608,3875,7837,7834,9376,10607,7835,4931,3254,10552,7836,9297,10467,10536,1557,10568,10232,4,510,9474,7771,7770,6688,511,512,7637,9626,867,9067,9625,9670,9671,10612,8729,9475,8881,8161,10364,9624,10626,8882,8878,10642,10647,10639,10643,9880,9625,8880,10644,7569,7762,4804,7567,7570,7764,10298,9493,7698,10641,8016,10640,9906,9907,9970,10043,10253,10255,10256,10637,10646,10254,10752,10531,7300,10645,3165,10521,10753,10548,2261,6855,222,10522,1520,1917,3059,1461,3595,3493,145,8306,4178,5995,10212,11105,6710,7019,6876,7761,11032,8222,8793,11031,9195,9552,9925,10229,11106,9661,10397,10315,8965,9675,9655,3874,4923,4146,3409,7172,3511,10749,10938,9993,10544,11033,7753,8627,11109,8088,8946,8945,10927,8944,8668,6263,10975,11121,10641,3236,9933,7810,8110,10239,10821,10822,10931,10930,10840,10639,10637,5066,8943,10748,10926,10928,10797,4923,11255,11252,11254,11251,7592,7554,7754,7755,7756,7927,10564,8509,11246,6740,40,6683,145,9635,5,173,8978,10207,11217,11240,9363,6639,4023,6732,2843,5431,8220,9300,7238,7912,11325,7849,10056,10836,1368,28,6598,10637,848,7580,1769,1766,1768,145,8175,1765,10893,1983,7304,11101,11395,9072,11397,3327,11398,11401,9543,11382,30,152,801,9,11383,1230,9352,8389,11381,11328,11431,11421,11171,10057,7356,6773,11396,6792,10687,4510,4752,1973,10788,11442,5363,122,10827,6359,1411,9466,11479,11473,11476,11359,10829,11478,11480,11468,10278,3014,6727,5513,11177,11477,6692,11416,10520,9149,8154,8002,11067,11071,9322,11517,11181,11550,8904,9677,11342,9378,10350,8688,11598,11552,4329,11175,947,4103,8681,5386,8698,1411,1266,8817,1685,810,5297,1685,14,6076,8154,8816,4512,8683,8594,10431,24,1210,5792,10520,834,7568,30,8730,7567,6689,7569,7570,7762,7764,8826,4804,9720,1589,2766,8822,7006,8278,10188,9906,9958,8814,10043,9970,10253,11031,10256,11032,10367,9354,9907,9629,10254,9630,10251,8826,10432,801,8358,9601,7959,8142,10868,223,9789,2818,10255,5484,2824,8814,2812,10569,8257,9348,11028,9678,8293,8520,9924,6113,3465,10146,11237,9221,9374,9807,9808,4639,7953,8809,4639,452,9000,11414,10877,9215,11388,11437,11443,10697,11163,11477,6689,11129,11600,11656,11658,11660,11659,11662,8888,10892,10895,11488,3889,6534,1257,2573,2183,7840,1345,3830,1126,6122,3302,8306,6660,7757,6658,8613,7833,6506,6533,4218,6715,7903,7143,3216,8514,933,3557,947,5305,5848,3217,6562,7180,3889,6571,4796,6570,1181,6255,3989,1057,501,4901,7184,455,1349,3520,9032,4109,3850,8913,2360,7795,5148,8842,8183,5552,8912,7031,9130,6712,8230,1738,8274,8871,7635,8271,3073,8903,4355,6876,567,1461,3071,9354,6689,9273,9200,9039,9369,7752,7753,9365,8088,8627,9037,8948,8851,9353,8943,8944,7881,146,2473,7234,1038,4735,9371,6684,9614,9773,9772,9767,9900,9386,9525,145,9879,9814,9788,7917,7772,510,5362,9938,9936,2039,10053,9665,10001,2033,9986,5770,9987,9991,10141,9951,5484,9769,4510,8192,10188,5839,10002,8826,4945,4941,10257,9981,9982,10179,10292,311,6512,10208,10173,3883,9618,7299,9832,5454,7986,9812,10116,10368,10146,36,7699,10398,8541,9916,10314,10268,10303,10290,9888,10544,10534,6971,10526,10540,8780,10474,10505,7985,10664,10048,9116,10535,3881,3890,10737,3897,10686,10736,3894,9946,10552,10542,9838,9950,10039,8826,10236,8547,10541,10548,4801,10505,10547,8933,10375,10472,6354,3070,3073,8727,9679,8946,3071,6688,9665,10053,510,7772,7770,10544,7753,7637,8816,8730,7813,8088,7120,10367,1895,8681,8698,8817,7751,7972,7973,9129,10463,8780,9720,9215,10643,10544,9720,9722,730,8172,9074,223,8933,9721,6953,8306,9492,5995,9281,10868,4178,8816,10892,10188,9879,5995,10212,10526,1215,9933,6894,8306,5602,3536,11271,9390,11476,11480,9669,11413,2164,11477,9670,9671,9672,9673,3646,1765,1765,3646,8962,1771,1767,4639,2520,11101,10278,1755,1116,4563,11658,5419,4784) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC