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,446,2869,5882,5915,6168,6162,933,6172,6712,6710,3850,1461,6365,6588,6365,6542,6540,1453,1351,6605,4109,3521,5887,6899,1563,3522,6544,6813,6396,2035,1766,2727,6656,3402,5551,2685,986,231,1730,6145,6146,4614,6311,1398,5756,3189,6214,6497,6489,5093,6223,6496,1234,946,6212,5947,3302,2776,6261,3479,6214,1741,2677,6221,6501,6212,8000,6496,1245,2696,8023,7638,8233,7304,3904,8485,8220,1645,8628,8306,8783,8933,8361,3287,9030,9153,9152,7117,446,7117,4079,4796,7548,9600,8933,7155,7107,9750,7917,446,9849,9206,7985,9264,10039,8648,7080,10265,10556,8910,11291,8062,1988,11236,11812,1173,11497,10591,11497,8995,9838,11690,11736,9647,11656,11770,11714,11905,11782,5995,4639,3860,3595,2869,2261,1257,446,215,4128,2632,501,3241,5799,5070,3936,3964,3989,4061,3100,4656,1461,6743,396,3830,4527,1057,3644,2639,2261,6645,4131,6793,6595,6214,3874,6796,323,5996,7022,1699,5362,1152,7286,7268,6212,1718,6216,6221,3761,7641,6218,6117,2687,6104,1181,6443,5142,4860,6607,6385,1770,1771,1765,1768,1769,1766,8258,5817,3625,3884,766,4109,5576,955,6845,3728,1568,6635,4126,3415,1055,1647,1727,2299,4689,961,3850,4424,6588,1826,1532,734,2398,1371,6215,3896,186,665,1461,5742,223,7635,840,947,4185,5542,5906,2889,254,5247,5322,3216,5837,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,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,6794,6189,1738,5877,6971,7240,3277,1057,6145,2530,3131,3754,6563,6350,6596,2477,2571,4769,6578,6727,1707,4422,9112,8873,4437,863,9111,8872,9113,4860,8649,8872,9049,4920,4254,5743,4598,1311,4854,240,3213,3647,4022,2915,3306,1196,258,2660,6845,4028,6104,4087,5222,2700,2046,3501,6824,797,6560,955,1561,7009,3534,6979,4985,7212,1349,1474,4779,1381,3564,6337,6342,7790,4230,1126,7846,1164,6261,4659,721,3392,1142,5093,2736,7861,1366,6732,2451,7023,5997,7780,7981,3979,1886,7821,1327,7712,6850,1047,867,2384,7005,1113,2590,6875,1134,8224,8206,8358,1970,8706,2677,8706,5314,2677,7354,5314,4901,7354,8306,4652,1016,3287,8805,7829,8961,5790,6314,3425,2749,8551,2749,7982,8933,8963,8795,8934,4598,9116,7906,7038,9061,8442,836,8915,8829,8923,6679,8935,9215,9275,9212,9377,6713,9600,8804,9653,3159,8894,9213,9834,9278,5379,5544,9649,9800,8827,7830,9836,10003,9730,9831,9983,9900,10039,10349,8172,9603,10399,10289,9964,9959,10395,10396,10307,10246,10765,10306,7804,8144,9832,5210,9922,10368,10016,11402,10907,11385,2849,2085,9406,10543,11310,10674,10881,11116,9542,11551,10466,972,11606,8620,11658,11670,310,11266,10000,9647,11436,11443,11446,9046,1953,11371,9741,10512,9299,11187,979,4730,322,5959,567,6870,6870,8030,7635,4860,446,501,4178,5996,7548,5371,7840,7878,7879,7635,7787,3850,2009,5421,1453,850,6563,6568,3913,8526,6726,8903,8816,8814,9030,223,463,9085,8094,8095,8488,9052,223,6740,7238,8220,9379,9321,1738,6809,9422,9198,8241,7374,186,7681,1215,3702,834,3029,6715,5995,1492,6631,3029,4437,7635,7953,1296,2635,4438,7995,7840,5782,6844,1357,3863,5380,5567,5769,7641,4769,3823,2041,7879,567,6621,6843,5784,1526,6658,8358,1371,7840,8690,7962,7953,1153,3913,4405,2706,5996,1343,5907,3029,6740,6740,7878,5996,8094,3165,6845,396,3913,8358,8306,2594,4234,5070,8047,8047,7069,6646,6984,6984,8287,6394,6940,215,1307,4432,2590,6565,396,36,1532,1127,6882,2419,6569,975,6669,6736,6566,455,6563,6675,3368,5576,2869,1351,6883,601,6676,6993,6994,7001,739,6675,6779,6998,6996,6999,6842,6947,6795,6562,6544,6564,7003,6990,7063,6574,186,6676,6678,6571,6997,7059,6986,1521,7228,1856,650,7229,6992,7232,3029,7231,7225,7227,455,1057,7003,7234,1532,1131,7230,2187,7057,7224,6669,7223,3850,7233,7226,7237,7157,7231,734,1181,1890,2192,810,6359,726,7299,2398,6512,6538,4362,7230,6940,6790,6797,6537,7681,6536,4796,7692,7699,7233,7229,567,6573,7681,7684,7685,6735,7013,7184,7234,7687,7634,4109,6542,2889,361,567,6540,7691,8094,6539,7635,8142,7047,6212,1266,8244,7883,7647,2989,1521,1954,2164,1559,4050,4082,3625,2160,2976,4218,5247,2932,2706,7835,7837,3142,3244,1163,405,8030,1718,1738,8182,8146,3479,4983,7654,5763,8150,8103,7761,1038,5732,1569,4452,7158,504,8222,8378,8371,396,1350,1521,4082,6069,1906,975,1826,8089,8281,2381,2329,1907,8290,4131,3003,8142,739,3288,2985,4710,6880,8547,6255,6855,2164,971,8721,8628,8629,4005,1920,1954,8492,1830,3744,768,322,4217,1134,2863,4325,2054,741,8763,5373,7594,252,2989,8890,8851,3625,4109,3715,2337,8901,5839,8089,8904,8936,8925,3195,6707,8134,8932,2934,2294,8933,1052,9009,9086,8871,5997,7981,4624,2946,9196,4767,1190,3026,2054,4240,9197,9249,8978,8795,8805,9220,8087,7121,8045,971,9135,9373,9366,9335,4136,8919,7138,5460,9466,9478,9477,9322,9455,8914,9539,9557,9578,9471,9464,4800,9353,9547,9607,9200,9332,9543,9654,7213,9333,9637,9680,9799,9798,9764,9769,3849,7640,9910,9904,9913,9914,162,9766,3830,4796,5236,455,464,4234,4128,4178,5279,6431,1453,6400,1537,3337,766,6195,4178,5995,6001,754,6587,5996,2158,6008,3644,223,4566,1343,6381,323,3860,397,2594,4656,6766,1826,975,6394,3964,6593,858,6986,990,3989,1591,6842,6947,6140,6941,6010,6985,1402,2261,766,5070,6349,6793,5882,1461,5331,6757,6779,6812,2374,6115,6631,6658,4099,4656,6779,6971,7003,217,6850,1029,2474,5530,2000,6951,1371,6996,958,5371,7019,675,3100,230,6312,7034,7148,6569,1917,6168,924,3595,6103,2915,3059,834,239,7226,4947,6813,3493,1461,4796,1558,1520,6141,836,850,3860,233,1785,1537,6431,6951,1776,6275,7739,182,2932,2000,6445,1084,5339,1521,3625,7156,4995,797,2446,1462,1779,1785,6400,3037,2387,2117,7761,4529,4659,8222,8232,8128,3542,1070,7897,4639,3521,7050,1490,2029,4079,7783,8097,4405,4259,8558,1890,6818,2117,8518,8611,8109,6631,1349,8535,8388,8629,5552,4218,1811,3850,8793,7976,2737,8839,8852,7918,734,3823,3966,6667,1558,8305,6814,8889,7602,7147,8183,7307,7795,1772,186,1774,6715,3302,8684,933,4991,314,6366,8281,9340,5769,2009,6583,6438,8561,3519,3554,5305,8978,9344,9290,9197,6700,7903,6255,6552,9453,8781,7048,6631,3520,6642,344,9776,8089,3557,9776,4849,2390,4087,9248,5046,9922,2122,9900,9910,9661,7759,9776,9928,7825,9308,36,9986,7998,10229,9798,1303,10063,6113,2989,9449,5891,2170,8816,6641,10346,10280,9552,9538,8586,10001,9602,9916,10469,10127,576,10292,10500,10375,9513,4349,2158,7173,10548,10526,10654,8956,10579,10652,10775,10652,10747,6562,10719,10894,10227,10297,10871,1765,1767,1771,1768,1769,1766,9154,9518,10670,6354,7922,3883,8272,779,10354,11041,10314,3073,6689,3071,8316,7557,8627,8088,11021,9037,7170,9945,7174,8241,9665,8333,8946,8244,10742,10924,10528,9665,7912,11239,5994,61,11104,10578,11364,10454,8306,4535,2467,8780,3131,8169,4131,8514,7903,182,2989,182,2522,5484,6117,7146,7615,7121,8910,9245,1402,9406,9116,7920,9431,9734,6744,9178,9408,8246,8244,8087,8067,9225,7704,6380,6416,6612,9734,9178,9501,9806,4286,4289,4304,4298,4299,4287,4292,4302,4296,4305,7311,7610,4297,7083,7697,7695,7696,7868,7694,2951,3442,11184,11149,11183,11181,11252,11174,5297,11182,10920,1704,11037,11179,11178,11231,11173,11175,11251,11185,11229,11177,11176,11186,2632,4860,665,766,1993,4860,1912,1912,3989,2417,6740,6740,4131,7910,9117,6390,2989,5380,223,1029,5576,7238,7304,6364,2869,6740,961,4294,5297,4395,4293,7593,1272,2605,1461,2706,5386,243,7179,7599,1371,7022,840,1351,7761,1095,4432,7840,1165,7984,6809,1349,4386,7176,8091,4985,4944,8135,7920,4945,4941,4940,4943,4942,4939,675,8358,665,8151,7239,7900,1126,8547,6600,217,8514,501,7241,7187,6953,7261,6570,6644,6104,8825,7665,8783,8626,6595,8142,8488,7910,3029,8781,8305,6499,6204,3549,7636,8019,5121,7994,8638,812,5334,9007,8055,6780,1645,1345,8047,8019,8780,7751,8816,8955,1073,6986,7224,6710,7932,9308,9343,8842,9647,9009,8620,7640,9465,9258,5678,2467,8681,9546,9558,9577,9900,6113,9945,9386,10046,9959,10146,10240,9601,10353,10346,10349,10467,10002,9257,258,8269,7659,9277,10060,10892,10814,2399,8471,8092,7900,7283,2913,8955,2761,4765,11272,11271,10287,7874,8033,11333,10715,6264,5763,1764,7266,7094,7105,7666,7654,5995,8846,389,7910,6175,1215,7665,8939,7155,7593,2995,9116,8358,4639,9202,9280,9300,8085,4983,9386,2897,8231,2085,7840,6678,7878,6971,8434,51,6725,8761,9030,4079,7783,6740,7147,6177,3760,5996,7146,7812,8143,7548,7602,8519,2573,2573,2473,2473,6633,1371,7863,7787,1029,6001,7878,7878,7878,6589,6589,6589,6569,1738,5994,8281,6538,6444,9076,7083,4860,7112,7083,6569,9231,9200,9231,947,6713,4765,9378,435,5251,7610,5691,923,2725,1425,2677,9747,9056,7114,9133,7243,9533,956,9900,8770,2635,10131,10247,7125,10039,10587,10591,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,4986,3165,8665,4405,801,8816,8815,7024,5995,7304,446,446,8520,4259,5419,8220,7635,9209,8142,8512,840,924,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,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,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,8491,6174,8296,2925,7634,8142,8617,1974,1993,1974,1993,7840,7879,7840,7879,6728,587,6728,587,8683,1308,8683,1308,6770,9403,7048,7847,3926,450,2627,3949,2628,4178,8565,8831,4716,9865,4716,9865,3913,6869,3913,6869,3913,6869,576,5484,6139,5188,3595,8169,1738,2467,322,675,186,8358,9030,9130,7635,7839,8851,8845,567,2889,7130,8547,9295,5421,8933,5566,6133,7634,8780,8698,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,3882,2446,1783,8480,8561,8559,8771,52,8910,7837,7899,7772,7150,7167,4464,3860,9309,9406,4395,6104,2117,8739,9983,4029,7962,2632,7103,9833,9300,8062,7143,7869,10865,11485,8816,8816,3761,3761,6740,6740,6809,6809,1145,6632,7580,6023,2677,7760,388,4563,7815,6986,2776,7599,272,6642,7605,637,7751,947,6871,6315,3803,7759,7972,7938,7354,4519,4558,7973,7837,1234,7834,7835,3189,5143,7836,5142,5251,8089,3066,8140,5936,8150,8111,5094,7920,4731,6713,8215,6691,8222,8193,5431,5536,8304,6810,7016,5817,1349,7005,2451,5947,4325,8390,7642,7105,3026,8281,840,8358,6732,8547,7246,8514,320,6693,8305,3913,8548,1738,5763,6354,8816,6595,5334,8802,8213,6726,4652,665,8730,8839,6778,8910,4730,8885,7903,8629,8220,8932,4936,9049,3542,4944,1886,36,4945,4941,7126,4940,4943,1521,4942,3775,4460,4939,4938,3449,1176,9300,8478,5841,180,1177,2657,9466,4950,3080,1042,7772,510,7770,7771,511,512,7637,7592,7755,7756,7927,8509,9880,8999,7019,8222,8793,9195,9925,9552,177,178,179,10229,10292,10056,9461,10063,10227,9769,10528,10526,10548,10543,9406,10358,5756,6659,9533,9675,9879,10964,10836,9383,9867,10232,10278,10938,254,9220,8904,11121,10626,9677,7928,8688,9196,8547,9636,11171,10397,10315,11219,6857,11439,11361,11324,11455,10748,9929,11397,10476,10149,10784,11396,7581,6117,9347,6731,9648,4536,2873,11374,6730,4329,6692,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,6633,3414,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,10670,6239,10940,3838,10940,3838,7300,7300,10283,8435,8290,10259,7910) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC