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,863,5719,397,714,6798,6390,713,6381,377,3036,6082,386,392,6381,3841,382,4906,388,372,6380,374,2701,2474,7238,3860,378,4199,6740,3933,6809,7833,8215,7903,1984,5995,4878,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,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,4834,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,6381,1766,1506,6617,926,2783,4146,6204,222,6178,1038,600,3841,4411,504,1770,388,1771,1767,1730,6742,1768,4156,6664,4452,3036,512,1557,4185,6390,1351,4146,1770,6740,3874,4614,4146,2023,6034,6036,6596,4473,6381,6038,4791,7238,7505,435,5143,1765,6740,7238,3511,3874,508,1771,1767,7834,6740,7238,6482,7473,7837,7836,2786,3874,6023,7837,7138,6639,7354,6730,6684,4146,5535,1215,3511,7837,7834,1245,6381,6743,6388,5386,388,6656,3515,858,6503,7107,5909,863,7654,7654,7713,7072,7155,7105,7644,7650,6796,380,7020,726,1250,1165,979,8085,4490,215,4128,2632,501,3241,5799,5070,3936,3964,3989,4061,3100,4656,1461,6743,396,3830,4527,4834,1057,3644,2639,2261,6645,4131,6793,6595,6214,3874,6796,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,7472,7078,6381,6381,7416,6162,5996,6159,2992,2473,1666,6869,7150,7081,7155,3254,4614,7079,7079,7280,6382,6152,6985,7243,7155,7713,8228,8228,1770,1765,1771,7182,1768,1766,9383,6354,3070,3073,3071,6689,8816,5094,9619,8520,8730,8814,8817,7751,7972,7973,9655,9665,3254,7120,377,7304,7643,3891,7251,3896,7076,6382,7092,3581,1557,6984,3076,6396,6962,8881,5718,7109,8228,8439,7238,546,6658,857,5742,5733,4716,4437,2041,3863,550,8220,6381,553,7539,529,7149,8440,532,539,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,387,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,8228,5255,5961,7150,546,539,6390,6391,863,858,6191,6527,6146,6152,6377,6517,6151,6144,6750,6388,673,653,275,6607,6191,6381,4614,7018,394,8307,8584,6270,6531,6529,7610,7870,7697,6652,6216,5691,6528,7695,7868,7696,3442,1704,7693,6654,8719,7189,8586,7546,4302,8897,8618,3515,8682,1770,2783,8896,6197,8728,7188,6023,1765,7187,7568,7567,7569,7570,7762,2780,2785,6491,6489,1245,860,6546,2696,2917,4426,6600,566,4490,1210,466,4752,4788,6719,3564,6539,863,541,6985,313,6200,6199,4121,4029,6201,6198,1533,550,801,1207,4788,28,8316,8313,8338,8333,8328,8341,8342,8317,8339,8325,8314,8324,8340,8335,1245,3883,3892,3889,3890,1770,1767,4301,4286,7180,7184,7698,6223,4219,6902,8252,8873,8340,8649,8872,6390,8665,324,8787,8785,375,8788,388,8786,6270,382,391,394,9111,9114,365,8858,3719,382,365,1779,7654,7155,7083,7083,8793,8544,8193,6381,7307,7124,7270,6004,6740,7238,8220,2041,6715,7976,7076,8738,6569,182,8541,8922,6843,3647,2331,6700,659,9338,9612,186,8762,8896,3581,8243,8872,542,1665,375,8786,1500,8951,384,1766,390,8334,8856,8332,9049,9182,375,8700,6744,8,8874,9274,6381,9501,9481,8307,6974,9686,6700,446,8436,8361,8210,7091,8287,7289,7289,8073,8206,8078,7154,8368,8288,8288,964,8268,5548,5548,8544,1296,6392,3864,8236,8425,8425,9739,9739,9286,1624,9659,1366,7445,7089,7111,7674,3860,6644,7112,8040,8082,7069,7069,8407,8407,1666,1265,8268,8268,7661,7501,7501,9856,7385,7385,7385,10077,9897,2520,7055,10387,10381,10390,10390,10386,10386,10488,6762,6916,6752,6759,6754,6760,6761,6928,6918,7162,11003,8696,8693,8656,4305,4299,9483,4299,9483,4292,4293,10920,57,7953,10823,10725,9590,11161,10199,9829,9590,10563,10923,10140,10147,8308,10924,9435,9436,726,5864,6504,10594,10596,3066,10600,8885,7014,6381,10522,10922,8586,8682,9920,8618,7891,10612,6191,10996,10998,10193,10197,10195,10200,10597,10640,10641,11054,10645,10639,10838,10753,11139,10999,11011,11012,10993,9410,9411,9416,9429,9430,10139,10151,10153,10176,10637,10199,10642,11055,11138,9232,11049,10799,8875,9113,9114,9182,11157,11158,11159,11160,11154,8662,11155,11057,11153,11156,10800,11008,9587,8325,8596,11152,10201,8324,10557,10556,10558,10559,10561,11161,10562,9589,9593,11242,11240,11046,10801,9588,10333,11238,11207,11151,11218,10727,11149,11241,9781,10646,11204,3784,7568,7569,7570,8330,8331,8336,8339,8341,9633,11209,11244,11245,10644,9087,10337,4804,6221,6497,6214,6220,6216,6501,6218,6215,6499,6212,2720,11203,11269,11205,9593,10323,11183,11178,11231,10326,10198,11184,9137,11301,11206,11176,10102,11009,8309,10096,10322,8872,8242,8327,9424,10334,9891,10218,8335,10214,8329,10920,10646,11320,11322,6538,6534,6532,6533,6536,6505,6506,11318,8883,1730,7169,10827,10828,10750,10829,9426,4714,11242,11167,11238,11295,10139,10752,810,1266,10725,10729,10522,11317,10557,9430,9592,9535,9894,10101,10102,10326,11405,11157,10556,11048,3896,3895,3893,3889,3885,3883,8272,6493,3897,3894,533,532,528,527,526,525,551,550,548,542,541,540,3892,3891,6042,553,539,531,524,3890,3888,3887,3884,11296,4510,6381,11430,7986,7987,537,8274,10137,11467,10321,8764,4558,8111,11432,3881,11407,10324,11022,6214,6223,10801,11247,10643,10647,8273,10466,8682,7546,11161,11405,4791,6223,11493,6518,6519,6535,6537,6372,6371,11294,6498,11254,6496,11139,10560,10201,6215,4555,9108,10822,11394,11584,11585,11586,11590,10216,10562,11574,11591,8335,8329,9412,9409,8332,9425,9427,9428,11617,11624,11625,9431,9432,11616,11615,11241,11589,11591,11601,11375,11650,11425,11575,11580,9905,11588,11592,11229,10921,11173,11174,6521,11429,553,551,550,542,541,540,539,537,533,532,531,528,527,526,524,545,543,538,535,529,554,549,547,9520,9521,9587,11321,11611,7546,11493,1768,1769,9880,1766,9920,11427,11697,8294,10321,3066,8294,6212,6501,6496,6214,6221,8883,6223,6222,6216,10216,11054,11156,11154,10639,11723,11618,11677,11759,8340,8334,6042,3883,6456,6453,6455,6454,6390,11650,6995,10371,10138,8331,8320,8327,11571,11030,11696,11031,11695,11032,11461,11460,11033,11406,10925,8273,11799,10520,8585,9149,4390,8154,11069,10257,10521,11078,11079,11080,11081,11077,11051,11791,6354,11576,7194,673,11075,10797,3070,3073,10053,10975,10544,11221,11587) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC