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,524,952,549,6204,377,3896,382,537,384,6082,393,539,546,548,536,525,528,549,545,537,546,541,531,6042,532,3883,3884,4301,3885,4297,3896,3893,3889,3897,3891,3892,3895,3890,1245,1303,3895,3888,6966,6493,4386,4291,6414,6964,4290,550,549,548,539,537,2473,6570,1537,6901,546,501,275,6743,6390,4659,6133,6821,1167,2263,6633,6209,6240,5566,3425,3896,5883,860,6382,6749,1970,6907,6904,5822,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,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,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,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,8815,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,964,6832,1183,7268,7124,4432,7175,7109,3368,3890,3885,3100,5904,3897,1145,6863,320,5046,3891,4099,7095,4724,3894,7986,8052,3989,3896,1073,7883,3883,7266,3881,4209,8209,4570,6315,6155,8222,6312,2737,8205,1439,2029,3612,8423,7281,7008,6713,231,8389,3933,8477,6942,8449,1698,6365,3062,6699,6697,8553,8635,7271,8202,228,1137,3195,7920,501,8517,8776,2737,4710,5331,8804,4805,2706,8736,585,2932,1089,3989,6315,6595,8801,8927,8805,5386,9036,8449,8386,9080,7674,661,5236,9038,8936,8553,9058,9059,7546,8682,8584,8368,7659,9079,9134,9108,9010,9293,8891,8892,2995,5247,9212,9298,4128,9134,8978,7268,9366,9308,8714,9406,3419,9200,9313,9402,9220,9258,9471,9295,9563,2594,9214,2246,6069,9527,4519,3474,9561,4805,9676,145,4624,162,9578,4656,9353,9813,9347,9807,9821,9836,9314,504,8282,9900,9950,9956,9954,9951,9157,1038,9541,8102,4131,10022,10025,10023,10011,10063,10065,9984,4635,9983,9991,10056,2615,10186,2976,10041,10074,10076,6683,10142,9928,7972,9811,7973,5236,9922,10048,10244,2294,10274,10270,7943,10272,10294,8629,10292,10079,10275,10046,8291,9983,10127,10342,9769,5460,10450,9527,10359,9745,10513,10116,9874,9873,10410,10576,10451,10623,10434,10407,8830,10479,5251,10674,10570,10399,10571,10400,10624,10401,10773,7005,10630,10771,10769,10768,8513,10891,10675,9249,10774,10862,10880,10798,10890,10811,10905,7672,10888,10693,10893,10938,9082,10863,9793,10967,11045,10001,9807,10733,11089,10783,145,11065,10951,11127,10895,10577,11122,10397,7671,10754,11187,9302,10625,10955,10934,10905,11095,10967,11106,11273,11172,11274,10965,3115,11275,11121,7268,11281,8006,8400,361,11336,10341,8807,11396,4805,4209,11288,9705,9688,10879,11124,9875,11423,11279,9744,11066,11395,9957,11107,8929,11409,11491,10076,9370,8071,11442,8783,11513,11527,10629,8462,11509,11604,8438,9577,11515,11573,9134,11542,10274,11442,8445,11627,11142,11633,7276,11515,11508,11689,11339,11654,11674,11693,11711,10030,11671,11713,10630,11675,9001,11041,11756,11753,3115,11763,11760,7765,11692,11767,11793,11502,8175,11746,11702,6699,11803,11804,11801,11824,11747,11781,11700,9580,8469,11818,11784,11777,11862,11863,11671,11802,11882,11883,11339,11881,11095,11758,11888,11889,7113,3897,3885,659,374,310,389,546,540,3893,553,964,1242,524,6611,6611,1151,545,1167,6209,4076,8289,7572,1810,7124,6405,6408,6408,821,7083,8198,820,8199,892,892,8438,8363,7646,7646,7122,7124,7107,1500,7094,801,1265,2145,2145,915,9274,5936,8171,7666,7666,7666,7072,3897,3893,3883,7270,3885,3884,3895,7655,3888,7094,7123,6740,3896,7987,7903,7088,8063,1770,1765,1771,1767,1769,1766,2183,4936,4944,4945,4941,4940,4943,4942,4939,4938,6644,6644,8081,539,8080,8384,8478,8288,7840,529,6493,7879,3894,7672,8273,7903,7019,7663,4801,8361,8306,4801,8306,8358,6971,2876,3828,8343,8602,8601,7293,6075,8547,3264,8389,7080,1126,7985,4454,3557,8526,6645,528,545,7079,531,544,1461,553,8401,8793,546,524,4512,4046,344,215,8425,4316,4046,4316,4316,4046,5298,3913,6710,7253,7254,233,6809,8401,8425,7089,8438,8213,8909,8213,8909,8213,8909,9055,9794,9741,9054,6104,9726,9358,9829,9880,9361,3511,3510,3511,3510,3511,3510,7252,9608,9594,5576,9610,2869,9611,834,8229,9609,8832,3510,2473,2530,3217,2573,6618,1609,6623,6143,6332,6371,6149,6221,5430,5756,313,2995,6215,1210,6443,1487,2917,640,4419,6550,6636,340,267,754,6486,7131,7873,947,1663,2270,2135,2446,1783,8480,8561,8559,8771,52,8910,7837,7899,7772,7150,7167,4464,3860,9309,9406,4395,6104,2117,4834,8739,9983,4029,7962,2632,7103,9833,9300,8062,7143,7869,10865,11485,3885,1766,6354,3073,3071,7751,4512,3070,6689,8244,7752,5298,7752,8241,7072,8246,8311,8682,7636,1368,507,8704,1257,7238,8174,7580,7881,272,6204,8306,446,1215,5995,5732,7837,9037,1165,7835,2023,8598,8840,8319,640,8247,8441,8425,8407,8439,8404,9138,9297,9187,8400,8568,9795,8794,8410,9564,8413,8782,8782,8451,8577,8208,7836,9372,8329,1347,608,1253,4258,9937,7920,10232,10243,8402,10095,8580,9560,10401,8450,9313,8407,6810,6770,3515,3889,8111,4769,4724,3895,6725,3888,5927,6971,1462,8436,7012,3884,6450,8390,368,8003,5922,3896,6797,3967,6004,6983,4297,4299,4302,9028,1265,6578,8355,7205,3581,9049,7160,8661,8490,8917,8885,6490,6209,7912,9502,7576,529,553,545,544,6544,3891,3896,6718,546,7580,539,3883,551,540,3890,6750,3892,2594,7987,537,550,8272,3888,3883,526,537,550,543,540,539,7164,8729,3897,7172,3891,8883,4302,7166,7167,7171,7165,7174,391,6066,384,377,6082,382,374,544,573,528,539,548,525,549,272,6381,6066,393,386,6082,6742,6796,6204,6220,6533,4146,372,375,673,6750,6751,6744,6749,6745,365,6270,387,378,376,389,6076,381,368,388,388,391,6066,384,386,6082,6082,390,6750,6751,6751,863,6197,7304,5996,5576,2869,7261,834,7079,4405,5371,7666,8361,7115,7106,7897,8463,7286,8251,7286,8251,7287,7715,7287,7715,6940,8450,8240,7938,8362,7671,5262,7243,1126,8644,7906,7072,2033,8469,8852,8891,7109,8891,7270,3892,8438,7270,3893,7294,8365,8769,7266,8724,8576,215,8569,8530,3890,8285,3989,8359,501,7959,8240,8798,8208,5070,5148,8470,5995,7935,3830,7638,8400,2951,735,8236,7125,7096,8641,8227,8050,8407,8396,8364,8396,8364,7265,4131,8422,7265,8422,4580,7297,8042,547,7115,547,7115,8085,9204,8771,7105,8792,1349,7675,8772,7354,8772,7354,9315,6315,9611,8909,9611,8909,9743,9744,9134,2706,9134,2706,6595,9053,6595,9053,5995,7155,5995,7155,5995,7155,8809,9877,8759,9745,8759,9745,510,1145,7665,9378,10320,9561,9564,9480,8832,9259,6493,8271,3884,8273,3896,3891,3889,3890,8272,3894,3893,3895,3897,8274,8272,3883,3885,3888,3881,4300,4299,4302,4297,4286,4293,4305,4304,4282,3893,543,528,538,8425,788,2023,7174,551,540,8404,532,6382,546,541,553,545,544,536,533,6493,542,531,6031,550,548,8212,8240,8529,7985,8771,547,391,2218,8832,2521,537,526,3881,3894,535,6204,6042,3889,7833,539,7816,8917,529,6788,2573,8274,8271,6650,6880,8273,8462,2521,546,2843,7815,529,542,3883,536,7075,7076,7666,4566,8839,7109,7118,8231,3908,7804,3829,9144,5732,9048,8716,9076,7175,573,7647,540,526,7935,7150,7671,9132,3883,1557,2087,9744,9138,7642,7642,9794,9950,8365,8365,8365,7649,9875,10026,9797,7082,7599,374,1664,6719,7437,858,857,397,1537,5910,376,382,379,6743,6144,4614,6751,388,6082,380,4302,379,391,376,377,382,385,390,3090,6742,3728,5371,381,386,6076,385,377,394,386,8168,387,376,8165,6750,393,384,375,388,6270,6066,372,379,390,3893,7199,6082,368,3879,7238,409,6749,3036,365,8168,1557,392,389,8788,8785,8786,4639,8882,223,7923,4395,8878,2989,8787,6103,6746,7871,367,2117,8877,6493,3428,8881,7239,8982,5770,8983,6204,7175,8358,6785,6144,6538,8856,6386,4714,386,8789,8880,8858,8855,9192,378,7300,6491,8651,3889,3896,3883,3885,4302,7214,3888,979,810,1165,8824,8857,8358,6359,5386,5297,9149,7599,7808,1266,1411,1685,4289,6527,6521,4293,6218,3891,3890,4294,3895,6532,3892,7693,3894,8271,3897,8272,3893,3881,3884,3888,3883,8274,8273,8981,8982,546,554,6537,8980,6381,3885,8879,2701,6377,9698,9713,9709,9708,9710,9711,1766,9718,9435,8241,8246,9593,9592,8310,9684,8598,8249,9427,8243,9425,8339,8242,8597,8245,8247,8248,8318,8317,9428,8319,9435,8319,9424,8320,9436,9426,8328,9591,4286,6199,9891,7094,7766,3891,1886,6382,3896,3885,3897,3890,3889,3895,3888,6380,8971,3894,3881,3883,1266,5297,9515,3359,6066,8585,6688,6855,8896,4386,9517,9518,810,1967,6382,6371,7185,7180,9522,6533,5063,5064,5056,8110,6872,4224,7882,6898,3893,3884,3892,6493,8271,9895,9906,4931,9679,7187,5053,9492,3070,8584,9907,389,9665,3073,3071,6689,6441,7632,1771,9880,9011,1768,240,10043,1767,1766,9601,9867,510,391,380,464,8714,9892,3380,8728,8729,10238,10188,2775,2084,377,381,6270,6750,372,545,374,374,544,531,551,2520,3890,3890,3891,3891,8877,385,387,391,6391,3884,6493,3896,3895,3888,3894,3888,3883,8340,7194,6386,7196,6191,9111,8599,8248,9165,8244,8883,9114,6146,8246,8881,1266,858,9119,9120,8341,8307,6375,8247,8311,8699,3891,8700,8242,8873,9425,9424,8337,9433,9432,9431,8334,9534,9536,1462,8326,3402,9592,5770,9114,9414,9411,8342,9518,9427,9144,9522,9517,9426,8332,8335,1990,8598,9412,8249,8317,8328,9409,6382,8245,380,8596,9436,9386,9428,9480,8874,6139,9500,9183,9535,6371,9590,381,9591,8333,3883,9588,3891,3884,3892,3881,6526,3890,3896,3893,9587,3894,8168,8597,8323,8243,8241,9589,9588,9416,8326,8325,8319,8316,8329,9434,9408,9412,8324,9908,8330,10102,10101,9868,10096,10099,10137,10139,10140,10147,10136,10138,10152,10153,10151,10198,10200,10195,10199,10202,10213,10217,10214,10216,10201,10215,4294,10194,10218,8649,10197,4296,4291,4292,10280,4282,4293,10098,4293,9633,10098,10333,10331,10330,10333,10331,10332,10323,4305,10324,9429,6201,10336,6199,9631,10322,10193,10100,10551,10328,10557,10560,10563,10607,10555,10556,7189,10326,10327,10562,10335,10103,1770,1767,1771,1769,1768,1766,10646,10643,10753,10647,5756,8894,10645,10639,10641,10752,10640,9880,10644,8887,5863,6820,6727,10874,10962,11073,7195,3898,9156,8988,7199,9409,8882,6928,9173,9172,8700,9408,9176,9536,6768,8971,1730,8387,8858,9146,9145,9147,9144,9143,8881,9150,9190,9191,240,9411,9151,8987,9192,9767,8986,8654,8656,9592,8530,8529,536,535,7694,7695,7696,7697,3881,3884,3888,7868,3890,3883,8531,3895,3893,7196,7198,7702,6937,7196,7198,8655,8665,8581,9993,8879,9088,9178,7705,6270,9633,3896,3894,9177,9175,1765,5386,6656,6985,9217,8168,2856,7870,9154,9892,10100,9155,9792,392,386,9891,10097,10099,9894,9906,9891,4305,8242,9903,9951,8274,3887,3885,10136,10147,10102,9909,9908,9950,379,10193,3889,3892,9535,8329,9535,8329,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,2658,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,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,3879,3893,3883,8389,8389,8389,8389,3897,3883,9342,3949,10554,510,512,384,8081,28,8628,554,6839,391,7967,9788,3893,3883,3887,3884,7985,3891,7986,8274,7546,7870,3885,8584,8618,8585,9920,10238,8583,10176,8389,9767,8,8168,10466,7501,8489,9031,2506,9985,7869,1049,10742,10033,386,6270,8881,8880,10098,381,11121,384,3894,3895,3897,8607,11098,11239,8290,7986,11301,3888,7987,11022,3892,3891,3889,11295,3890,3884,11299,6261,8272,3883,4300,4292,4294,4298,4301,4305,1770,4293,1765,1767,1768,1769,1766,11319,3881,11317,6520,368,11392,9024,9024,9024,8582,9840,9865,10480,9633,8310,8897,7698,3254,842,8274,6520,3897,8272,3883,3884,3895,3892,3891,3888,3896,3890,3887,11458,11459,10238,8585,9407,9920,7870,8586,8618,8682,7631,11722,11218,9084,7546,10565,2807,2806,3887,3883,11375,1765,11085,9137,979,9149,8824,3888,5576,2869,3883,1351,834,3884,7019,8274,8222,7761,8271,9195,8793,7987,9925,9552,3890,8573,6526,3897,6520,766,6521,7672,3893,11429,3881,3896,3887,11430,3894,7286,11750,3891,6521,11121,9609,7244,6493,3884,7280,11650,10920,10938,3895,8268,3888,10921,11427,3893,8343,8741,10921,11425,6521,10923,10834,9905,5383,9199,9909,535,9658,11186,3892,6520,3997,653,11212,4282,7086,7285,4305,4298,11370,554,4301,9082,524,10827,6596,525,10888,3884,3926,3884,3926,3895,11564,11734,3997,7987,3881,7986,8271,8272,3883,3897,3896,3891,3892,3890,6455,3887,11429) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC