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,6154,6794,5996,3860,391,6151,6159,1126,6562,7238,6140,377,1558,2005,6578,2635,7576,7576,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,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,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,378,376,389,6076,381,368,388,388,391,6066,384,386,6082,6082,390,6750,6751,6751,863,3882,6197,378,1461,6724,7175,5286,8222,7872,856,7297,5371,8182,8144,8377,7987,7149,3989,524,7878,1257,5602,8610,8547,8480,8629,8792,7913,8031,8890,8821,8876,8819,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,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,3882,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,4302,6842,3976,2118,7761,6842,6010,3532,3595,3169,8093,6713,6505,8185,2933,3542,219,8220,6314,1347,6264,8547,3823,7151,7019,7761,8222,7647,7151,8793,7109,7125,6192,7082,8365,8816,8727,7080,7663,7550,2337,4455,4234,8923,8888,9038,9030,4566,2976,8222,8220,7879,8450,7258,7953,7879,8250,8615,8926,8995,8823,8990,421,8082,7953,9270,9271,7239,7281,9054,8084,7594,8361,9321,8083,7910,9315,9277,8222,8406,9469,9470,734,6168,8220,7238,6740,8998,931,8458,9527,9526,7070,7238,8401,6740,6740,8220,7238,7106,9552,8208,8891,8434,9302,9278,6386,3395,8439,1563,7022,3395,7904,8201,7256,3541,7944,8423,6731,1663,1663,1765,1769,5544,6740,1385,814,8423,10095,9261,9647,7907,179,3590,6828,178,10190,3380,5252,7094,10109,1645,8460,9571,3864,10584,4861,576,9058,7238,546,6658,857,5742,5733,4716,4437,2041,3863,550,8220,6381,553,7539,529,7149,8440,532,539,323,313,397,860,6386,549,8542,5853,6769,526,7704,538,528,525,7704,5853,540,551,864,544,1730,545,531,543,391,535,541,536,382,1271,4769,376,524,377,365,376,374,6270,384,2856,8787,368,6066,6082,385,394,6197,8858,372,6076,317,3913,317,3913,6382,6523,8165,375,6526,8496,3879,7588,8989,8530,8160,1380,3823,6854,6391,8159,8157,7300,7605,4701,8785,6144,9437,9435,8244,9438,8340,3879,8699,8874,5770,8316,9146,9414,9409,8700,8245,9436,9425,9408,9184,8883,8329,8247,9182,9415,8332,8318,8324,8326,8319,8241,9592,9183,9428,8248,9431,9894,9150,9143,9534,9190,9908,10045,6768,9300,7632,9154,6396,4501,10056,9792,9891,9155,9156,9217,10202,9156,10198,9854,9217,9502,10193,9502,10193,10197,10195,9147,8333,8335,10099,10102,9151,8330,10218,10147,10333,10322,10323,10217,9412,10102,10336,10332,10334,10101,10331,10100,10324,10140,9433,10213,8341,8682,8649,1266,7753,7752,8627,8088,8699,8342,6270,372,5066,374,380,386,393,385,8727,510,7772,391,389,390,392,7751,8786,810,6076,5332,6652,6654,375,8784,388,6066,391,368,384,384,384,8786,367,546,372,5996,3888,8729,391,7548,3890,3885,1492,7160,6749,3889,7987,7986,1462,377,6076,8968,1462,8968,3890,372,6593,7576,6593,7576,6593,7576,7985,8271,314,8389,6174,6175,9030,1726,6493,8272,3891,3883,1726,3897,378,8878,8877,7576,392,7599,7576,4473,389,3894,3884,3881,2992,368,2145,376,6076,6361,915,6361,6066,1108,1167,546,8267,8788,8223,390,8223,3892,9537,9547,8789,5956,4979,5956,9536,9536,6843,9266,6843,9266,8858,365,6204,6593,365,6593,6750,8878,9616,6743,6751,8390,8981,8983,6750,9879,6746,8879,6746,8879,8980,7196,8167,9950,9692,8230,9692,8230,9525,7588,6745,6386,6745,6386,6743,9890,10167,6916,7610,6745,10263,9829,8598,8317,8336,1704,4289,8874,5691,7693,6376,8241,6517,6375,6989,6995,6234,6419,6388,8387,7610,7697,7694,7695,7696,3442,7608,3515,8244,1665,6175,7054,3891,1765,6270,8246,382,6995,8788,388,6076,6768,3892,6223,381,379,391,6376,6375,378,8878,376,392,393,385,6271,726,5864,6373,6527,6522,9182,8340,8325,6529,6530,8324,8242,8599,8322,8335,8334,6534,6536,6538,6532,8300,5827,6266,8315,8320,8319,8317,8318,8248,8971,6533,6505,377,381,6270,6750,372,545,374,374,544,531,551,2520,3890,3890,3891,3891,8877,385,391,6391,3884,6493,3896,3895,3888,3894,3882,3888,3883,7150,7499,7291,7975,7122,7154,7107,8033,8228,7247,7654,7100,7967,7155,6718,7298,7906,8205,7106,7103,7251,8361,8580,7297,8208,389,7270,8381,8425,5936,7674,7967,7294,7079,8203,8828,8407,9049,7096,9158,8047,7266,8207,8203,7642,8413,9141,8980,8879,8981,8982,8983,8498,7704,9146,9882,9794,9892,6744,6749,6751,8410,6746,6386,9176,9762,8581,9177,10097,10098,9821,10189,10095,10078,9733,9088,6854,3894,3893,8784,392,6082,372,365,8530,8529,8201,6076,9217,4305,10161,5995,7913,10263,10213,8882,8788,8786,8451,6719,10020,1766,6198,6222,7162,6216,7199,6391,6388,6214,2951,6220,6218,9829,9165,8156,6920,6925,6926,4304,9734,6988,10161,6742,8656,9176,9177,8816,6498,6497,6216,6499,6939,3248,9737,7953,9176,10387,1767,1766,8330,8328,8323,1768,7569,3515,9590,9591,11047,9593,10201,10725,10920,10561,10728,9588,10139,8325,10801,10216,9429,6534,6535,9493,3073,3070,6354,7753,6689,3071,10544,10053,9665,9946,11221,10544,10975,7019,6781,368,10098,376,9499,9386,8880,4769,8788,6082,378,10961,367,386,990,368,11006,8878,8881,392,8880,8882,8878,10162,380,381,384,385,390,391,386,6390,6381,10371,8983,8981,6743,3883,10222,1730,9165,9601,3898,9534,8982,6742,10167,6744,6746,6749,979,6359,7599,6768,5386,8879,9217,6750,390,8241,8334,10334,10336,10335,9920,10238,10194,10200,10263,8877,382,8330,8320,8339,8337,9891,9908,9113,10202,9111,8242,8873,8872,8649,10152,9112,9120,9431,8318,9114,9119,8326,8310,8247,8313,8309,8308,9633,5691,1685,5386,6195,1765,10546,10545,7845,9633,9903,9905,6533,2605,5386,1769,8824,10546,9909,9137,8824,1685,5784,10522,9137,9149,1770,8917,1771,1765,10925,8824,8489,7869,1967,9031,5770,4714,10645,10646,10750,11167,10925,10922,9985,10466,8592,5810,390,8784,8788,8881,10613,11051,11248,11247,8882,7134,7877,2071,9303,9350,2506,11239,4714,11022,375,8787,372,376,368,381,6066,8858,385,380,393,375,391,386,6082,378,8784,394,6270,8880,392,365,8878,8786,8789,10896,11088,11327,11329,11182,11231,11249,6375,11178,6271,6076,379,6537,11173,11176,11175,5332,1411,810,10521,11183,10827,1266,6535,11229,11174,11186,11252,11185,10921,11238,11519,11295,11296,6505,11318,11294,11239,11254,11301,11251,11585,11571,4923,10731,6600,11085,11665,4520,11666,11667,11085,8175,10823,10278,7922,6354,6503,6523,11425,5383,11429,11085,8584,10251,6023,10193,7917,7054,10332,10562,9429,10139,3071,10559,8618,10557,10726,10215,10325,10326,10327,10322,10218,10328,10334,10330,10331,10333,10329,8943,8944,11019,8885,7752,11033,9970,11047,4923,8787,9555,9522,510,694,681,391,8880,378,365,372,385,9231,389,8878,381,6066,9150,9143,1769,7881,380,11022,11057,11247,11269,10176,11238,11254,11296,11051,11239,695,9031,8244,10555,694,10801,6540,9429,6544,11157,10199,11218,10556,10251,9970,8784,9906,11151,8882,8881,10463,11207,8343,10214,11154,10558,8883,6270,10216,9184,549,393,10800,384,11407,11392,9587,8323,10561,11299,9147,9154,9155,11078,9156,9792,10957,9217,9151,9146,11405,9191,8858,8789,386,8788,375,382,11209,11052,11294,11320,11461,11406,11462,368,461,7861,4259,11077,4251,6788,11081,11079,3895,3893,3891,3887,3894,3890,3888,3884,8272,6493,3897,3896,3892,3889,3885,3883,10098,6388,9144,9468,368,365,386,6076,8880,379,11568,6270,376,10431,11080,653,10612,11602,8787,3997,10176,2520,11791,11405,11759,6520,11432,9217,11078,11799,10637,389,8530,6042,10794,11069,10151,11247,11254,11817,9165,6271,11897,11677,11696,11238) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC