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,964,6832,1183,7268,7124,4432,7175,7109,3368,3890,3882,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,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,9225,9338,7715,4234,8063,9082,9362,8644,3884,7121,8615,6134,8412,9264,7280,9398,2677,7984,7932,8306,8423,9662,9382,7661,7759,9658,9464,7662,9148,9659,5179,9844,7108,4947,7023,1533,3493,9563,1461,2995,2417,7986,4046,4769,10076,3863,8891,6781,8449,10026,10051,9220,10212,10077,10126,9821,2644,2455,10025,5454,10185,6209,3875,6986,1370,7280,10275,10273,4906,956,7149,9444,10436,10063,9787,10506,9325,10149,10314,8782,9543,10523,9741,450,9533,10271,10578,9822,9747,180,4724,8972,8762,10768,9492,3891,1370,10767,7985,4762,10257,10890,8071,10854,9373,10882,9993,10888,10302,10881,8783,6102,10554,9608,6876,10887,7251,10190,3863,10789,10702,11130,9793,10078,10938,5251,8743,10965,10991,11025,11027,11188,11224,10823,5331,11212,11268,11189,4778,11278,11196,11281,10670,10701,11038,11262,11329,11187,11337,5454,11108,11376,9795,10274,10412,10187,11402,11336,7913,8474,11215,10862,11455,9199,8423,11228,11524,9417,9308,11331,10839,4645,7261,7792,4791,10615,11449,10072,11511,4355,11633,8721,11302,7986,9817,9481,11628,11484,11700,9993,11038,9649,8366,7363,7094,11117,10818,11629,11760,4401,11797,3883,11758,11444,10891,11776,1371,2677,10360,11553,5331,11793,11327,2658,11105,11763,11101,9398,6904,721,11712,9554,585,8460,10716,3744,228,2677,6691,2677,5088,3904,4082,6696,1347,3080,6774,5817,2294,6633,6858,6863,6693,1299,4724,6793,6821,3612,6809,2262,739,608,6845,6104,6006,3115,4432,4566,320,3701,3719,7592,4652,1699,1349,4778,2451,1073,2841,7839,4460,6732,6209,4258,7946,7081,7265,7268,7971,8058,7069,4029,7154,8211,8044,8058,7244,8288,8429,8361,8078,7080,8403,8209,7294,8713,8400,3066,8469,6650,8207,8402,8468,5947,8839,8772,186,8195,8284,8876,5936,8281,7913,931,7884,801,659,3647,5545,971,9249,5961,9141,6069,7718,8468,8408,1163,9560,9743,5956,9458,9480,2329,1906,9028,8460,5460,9875,4710,9874,9648,9876,9877,9878,8445,9648,8446,10275,9132,9133,9619,9620,9621,9622,10575,10078,9748,9793,9746,9747,10292,7671,10947,10948,9609,9611,9608,10687,7262,9610,7241,7672,9878,11062,10965,10943,10906,10881,11187,10506,11045,11096,11059,10941,10891,10026,11262,10879,8573,10888,11018,11370,11275,9205,11277,9794,9756,7077,9675,11332,11337,8397,10676,11369,11469,11539,11542,10678,11266,4227,4226,10703,10449,10854,11410,11553,11614,11675,9877,11627,8740,8568,8424,10332,11252,11695,10325,11319,11696,9624,7172,9232,3559,7165,7170,7163,7171,7169,7164,7174,7173,7168,3115,11255,8228,8577,9554,4463,7166,7167,7677,4473,4470,8662,4464,4486,7070,2823,6443,1741,4645,9892,8712,11527,9509,8946,6688,9867,9383,5251,9676,9557,9325,7981,9526,10080,7909,1823,3856,10061,10081,7807,8737,8175,8206,4770,9503,2032,9968,4230,1487,7150,3511,3564,104,3189,10275,9547,3896,10274,8767,8467,10008,10965,8063,10271,7297,8641,7298,8712,8046,9203,10789,8394,7262,10356,10449,8205,8468,8202,11553,11634,9095,11038,11683,11362,9782,9312,8713,7279,9756,7265,8475,7666,10272,8458,8461,8537,7077,7971,7068,10789,7984,8391,8393,8211,10659,10692,10588,7087,10588,7111,7115,7116,7117,7119,7125,7675,7895,8047,8048,10169,6131,9055,8770,9134,8739,9204,9206,9259,9529,10690,9563,11124,9578,11276,11471,9539,8063,11336,11337,9148,11059,11187,11469,11470,10906,8058,11376,7077,11034,11542,11035,7279,7666,8044,7077,7265,8213,7930,7280,7279,7244,6740,7238,8220,9742,10229,2736,10274,10630,1770,1765,1771,1767,8060,4302,1769,4291,4305,9588,11155,1768,11158,9587,1766,10561,1967,9880,9483,4301,10941,4304,4287,11159,8192,4293,4299,7782,8714,10840,2520,4286,4289,4292,11185,10045,4294,11269,10044,4296,11406,11405,11295,8596,9590,11407,11030,11031,8087,4304,4300,4298,11464,7188,11419,9132,7870,8584,9148,7631,11509,10623,11187,9259,7152,7115,7116,7272,7932,7096,7245,6726,7125,7241,7897,7106,217,7266,7084,8055,8071,7270,7671,1029,7672,8079,4597,8087,4770,8062,1402,4662,8384,7668,421,7675,8269,7657,3550,8019,8077,8657,8053,8363,8202,8739,8052,8081,7668,8468,7931,8418,8084,8056,7071,8471,8422,8641,8087,9148,8736,9053,7671,8475,2573,2328,2388,8450,3297,8438,8477,130,5915,8385,8041,8288,7656,8045,8042,8068,8407,8782,8065,8057,8060,8069,8067,8282,7660,8058,8051,7095,7097,7666,7669,9160,8359,9054,9055,8367,8419,9573,9574,9575,9578,8476,9577,9561,10022,8467,9539,10074,9793,9580,10077,9999,8235,8642,10009,10023,10051,9158,9565,9998,10075,9572,10186,10027,8082,8078,7076,7081,7108,9443,9445,9510,9581,10024,10026,9562,10076,8364,10185,10022,8767,8410,8085,8507,8528,6879,7628,10272,8411,8412,8398,8397,10275,9793,8396,10186,10690,10659,8286,10629,10624,10689,10030,9225,8439,10630,8408,10675,10770,10773,10691,8644,10811,10807,10774,8405,10625,6896,10835,10843,10889,10891,10852,10853,9187,9204,9206,9218,10881,10906,10692,10862,10863,10834,9206,9219,9263,9262,9261,9264,9875,9876,11066,10271,11062,8567,8473,9292,9313,8201,8207,7290,8569,9314,10965,8206,8537,9367,9368,11045,9316,8468,11027,10586,11187,10450,10405,10401,10890,11336,11224,11333,10572,11368,11370,9294,7275,8229,11331,8474,10694,8383,8929,7289,9399,9400,11376,11500,11501,11502,11507,11506,11503,11513,11542,11614,11538,11540,11528,8406,9445,9082,7261,10771,6646,8063,8641,9313,10511,7281,7108,10945,10889,10675,7670,9609,10027,11332,7285,7091,7654,7286,10077,7272,8641,10947,10403,10409,11555,10835,9530,9445,8460,8568,9563,7249,8083,8641,8086,10584,8657,10575,9082,10624,7258,10582,9187,8459,9134,9609,10869,10789,10906,7106,8430,8370,8424,10767,11045,8039,11187,10584,7071,11124,8045,11278,11277,7121,8056,10692,8739,8039,9054,7276,7272,11196,8370,8282,9539,9578,11124,7662,7661,11125,11276,7278,11334,11376,9793,8711,8431,10510,11472,11469,11471,7241,11411,8711,11470,7574,11196,11525,11511,7108,9370,10580,10275,10271,11333,7271,11526,8411,11300,8610,10888,10720,10976,6870,11189,8144,8030,7149,10011,7910,8208,4254,8892,5763,8891,5371,10768,11386,8370,11384,9557,8482,7280,1049,10869,1343,7277,9757,1016,5988,10007,10649,9739,9959,6103,28,7208,7247,9740,10854,10855,11188,4598,11471,1308,7641,11277,8400,11402,11553,10906,450,10011,10694,11271,10510,11572,8577,8471,8547,10818,9136,11676,3908,10483,9563,10884,10372,8,11707,11634,11706,10275,7273,7248,11709,11743,8279,10977,11746,11771,7088,11776,11376,10965,2447,11704,10789,8178,11818,11839,6264,8022,11840,11283,8891,11879,10051,4659,7281,9609,3967,11337,2847) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC