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,4178,222,446,4860,1398,4796,2776,5799,5070,808,1586,734,6192,1461,6117,5236,2915,947,3392,3465,3059,228,233,4029,2473,1371,975,5995,5362,3014,1520,5286,766,6249,501,2594,3989,2932,2706,4767,6556,4769,6250,4045,458,459,28,4950,5081,215,4128,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,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,4860,665,766,1993,4860,1912,1912,3989,4834,2417,6740,6740,4131,7910,9117,6710,2033,4223,4860,501,2932,1461,766,4798,5070,585,1690,4796,1038,3989,3037,2706,3904,6863,6693,3595,4061,5148,4969,2261,4234,5995,1325,3830,1215,5799,1257,3241,4209,4656,5179,3080,5286,2657,739,36,6779,6679,4886,3964,504,446,228,5543,2976,3493,5331,2294,7143,608,6858,6595,1699,5795,7126,4258,1137,5817,1253,7709,5545,4460,997,5339,4178,3059,3080,4635,2933,1347,6981,5207,5142,3775,7019,6632,5193,3525,6986,1917,4566,748,1347,3100,233,7582,6842,3542,7761,5373,2337,7883,2894,6010,6713,4131,7920,1521,7759,7839,1369,215,2658,969,2025,802,7238,8193,6740,5236,4987,8548,5996,6713,7138,7760,5576,4046,3241,501,1351,2706,3989,834,1461,3830,6940,2915,455,255,2530,6849,4385,5362,3479,2261,4125,1532,1826,7019,4770,6845,6809,6366,4254,2658,1520,1350,645,3370,975,1181,4160,2192,4423,396,3797,1738,455,734,1131,6192,744,5877,5362,766,4972,2674,5179,5764,4696,4861,5247,1038,5764,2381,4730,1152,2882,4766,1057,1890,1439,1532,5543,2192,2331,2360,4240,3761,1042,4830,1835,1176,2657,5321,1177,7156,1826,1190,3062,3775,1461,6848,6780,1600,5321,2876,467,1176,7761,5487,470,3059,1092,3590,3303,1098,4964,3844,5765,7019,1600,1416,4947,2261,1460,2760,3136,4164,5218,3493,4984,3830,4348,6981,6104,5995,7834,1522,1869,2639,7837,7995,7836,8150,8146,8135,8000,7354,8087,665,7919,1416,1038,3303,5764,3590,3989,5623,8183,2033,215,5179,3844,6824,219,243,261,360,3067,3303,3341,3415,341,3418,3482,3778,8150,3788,4217,4722,5306,5509,6827,7835,6632,8089,4652,3941,5362,1257,1253,1318,1432,1325,8306,6154,3368,446,3830,4337,6713,1349,5576,1521,6595,1532,4652,3761,4460,1461,1038,1690,6684,5545,5719,7708,1369,7920,4395,4131,7812,7138,7239,3542,7839,3941,4082,7783,4209,6117,4566,6793,7919,4258,4796,7020,8305,4983,7836,8222,308,5997,7821,7760,1347,5657,7803,8025,6849,8020,7835,6780,6156,7212,7147,6813,8923,8869,8890,4131,8925,8901,8900,8846,7839,4209,9054,8055,8080,7110,8044,665,7582,1253,6154,6315,6639,585,606,736,6674,8911,6942,6694,7712,1690,2025,2135,7602,8089,8306,6782,7138,3904,6863,4355,4220,8019,8615,8222,1461,9195,2590,7106,7096,223,5020,2933,6010,4023,7857,734,6785,6673,8025,7138,7005,7859,5286,228,3933,6792,4801,5148,5373,5349,5339,6901,8543,7837,7835,7834,7836,8441,9376,9073,9528,6177,3921,3585,3100,3941,6599,1248,3479,4046,3172,1038,5148,5215,4740,1038,5764,455,4045,2421,4739,734,1152,5081,4088,4455,5837,2387,4539,6703,1163,2381,5331,4861,4385,4045,1954,5543,4670,7810,7718,7857,971,6552,4752,3989,7761,3976,3493,6563,585,6556,4209,6883,6863,6576,4878,6993,7840,2863,8183,7879,7878,7857,4773,176,4220,1917,7903,7834,2674,748,752,836,3454,967,1826,231,8793,3715,4082,1521,3370,7614,8888,8925,8901,5373,7615,4258,5339,5545,5817,7126,5247,3368,7920,2294,6861,1253,6858,7883,3080,2933,8615,8548,8999,5837,7857,608,7839,1347,9372,1699,9614,9195,6809,6845,6104,9200,9541,9366,9300,7619,9925,9321,7619,7875,9897,8890,9463,9937,9777,9349,4460,9888,7928,4223,9921,9478,10065,8846,10039,8948,107,9615,9993,9464,9661,9808,8819,3549,9258,10090,10087,9527,10243,10089,10088,10342,3346,9052,10260,10480,9374,9453,10548,10212,10265,10259,10127,9798,9929,10568,9347,10476,9634,9930,6117,7581,10784,3080,6857,8543,9648,10878,5339,10086,9961,10915,10523,10375,10626,6632,10149,10937,6793,145,10738,11020,4765,9045,7919,10210,10913,9387,11142,9389,11022,11235,10804,10938,11219,1232,11195,2615,9198,11280,11234,11220,11281,10227,11282,11122,11021,10528,11324,11272,9647,10110,10911,8889,11131,9959,10911,6824,4901,10014,10013,10012,11423,10108,10109,10016,11495,1232,10017,10018,6981,10004,10005,11489,10648,11455,11608,9212,10619,10164,10015,10621,10620,11443,10894,11314,11361,11645,11435,11349,11705,11551,11699,11670,11661,11491,9220,11646,11495,1185,11235,11280,11608,11703,11488,11455,11838,10355,11919,11923,11872,6740,1461,766,924,5647,7238,6693,7637,5995,7751,3830,6809,3850,7238,7083,7654,7094,2989,7124,4769,2677,5995,7670,7666,7594,7647,5647,446,7642,7122,3964,7114,7661,4406,7662,7081,4082,5602,7359,4936,7279,7272,4944,7648,7093,7123,6209,7097,7101,7115,4724,2023,5732,1490,946,4234,5148,3241,501,5179,5799,766,640,7940,7943,7093,8064,7084,7946,1038,6981,7931,8393,8391,7941,9634,9648,7581,9347,6117,8543,9798,9930,9932,9929,6857,6857,9637,9961,10784,10476,10149,10878,4639,1145,4796,6867,1498,1210,1121,947,4535,8390,6740,7238,8220,1215,5371,4234,8271,5995,8109,5070,5148,1126,7160,4788,3564,2706,8230,8306,446,6971,5995,6740,7238,7283,7641,7238,834,1371,933,3302,2530,2183,2594,6842,8142,7635,567,1070,8306,8306,223,2876,2033,4861,5070,2932,2706,4860,766,5179,5148,7020,5799,7635,4109,567,4986,8617,8845,2889,5551,446,7634,8358,3216,6189,3216,435,344,5572,6645,228,1145,5839,6540,6122,6544,6172,6257,1425,1210,5777,3825,501,2594,5459,3302,6350,933,4079,463,5305,7850,3428,6544,6971,501,766,4860,7240,4796,3217,4861,3264,2164,8390,8306,3989,6167,4454,8781,6740,319,5995,2261,6740,7238,7840,8220,7879,8094,7878,8617,7634,4109,8358,8183,8629,5799,3066,1298,4648,5739,8745,8744,30,8146,8514,5070,1439,6842,8488,8095,8826,8834,7920,8816,8616,7781,2766,972,8089,4082,5373,6713,5142,1521,3542,3715,7920,3625,3413,8852,7550,8888,1349,4005,6200,840,8886,1371,6103,4395,3409,7107,2843,6483,314,3874,314,7078,6984,8145,3860,4224,2520,7100,5066,6658,7289,7816,7816,5897,5996,5996,2992,1537,3172,7783,4597,8683,6350,8161,1250,7548,7548,4801,4801,8820,7160,8223,8526,8547,8815,531,7080,8055,8047,8033,7998,7998,501,41,9936,6010,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,4834,8739,9983,4029,7962,7103,9833,9300,8062,7143,7869,10865,11485,8358,10141,9729,10394,9978,4454,10188,9116,10836,2706,10551,10606,10750,2594,6010,8241,10325,10336,10327,10326,11028,10920,10925,10970,9084,10556,4535,1095,7773,4395,5996,3428,4395,2932,4209,4079,8902,9630,8092,526,546,4796,4769,5995,4860,9761,9746,1439,9785,10002,9808,7920,9750,840,608,7839,9668,3941,9925,9638,9220,10173,10165,10149,6632,10243,10115,10135,10245,10233,10229,10244,9993,10042,107,10148,10188,10243,10246,10284,9406,5647,9453,10266,840,5419,10440,1461,10080,10258,10380,665,10283,10439,10141,1215,10212,10268,3913,10314,10375,3989,4861,5148,9052,5799,1257,10062,10227,3241,2706,8893,6842,5070,9602,8514,9420,4234,766,10787,4861,4901,2894,2594,8517,10879,10894,501,396,10128,10895,10315,6842,10375,10306,9453,11028,10020,9780,10569,7614,7615,7550,6713,8837,4082,7017,8888,11237,9454,8925,11488,2706,10856,11349,5373,252,3542,1521,9220,10375,11593,9904,5739,9374,9615,4455,4739,10857,4455,4739,10857,1490,640,4411,2023,9987,779,11644,10798,10300,8049,7906,10342,10530,11595,11678,11594,8548,9850,9348,6557,6961,739,11492,1127,10131,7019,8222,7761,8845,4109,9195,1662,4796,7837,7834,7835,7836,8441,9297,9552,7003,8851,9614,9300,9030,9960,9925,7641,8617,9548,9879,9897,10056,9525,9463,8296,3989,7634,6726,6849,6971,9890,2164,8281,9488,10526,9085,10265,8948,186,10836,10302,10471,8962,8726,10549,2261,10480,8816,10531,1461,11121,10464,1645,11128,11230,9951,9000,11325,7909,11304,176,9814,8995,10064,8109,6712,650,8512,3849,10656,6571,11089,10636,11494,10040,11644,9993,11741,11219,10938,11324,11455,10548,3595,9993,6876,8388,11457,9634,8798,5799,2925,9476,9052,5179,5148,4861,5070,4860,4234,3989,3241,2706,3830,766,5179,2932,10548,10938,10823,10284,9085,10782,9925,11219,5995,8306,1257,180,5799,4739,9900,10212,9116,10002,9600,4861,9220,2261,10737,3287,10526,11324,2033,3493,9052,8048,8041,7261,9930,9929,9921,4798,7068,8071,8439,8368,9461,9931,10244,10227,9817,4178,9543,10476,10149,9961,7086,8837,8793,446,9661,9195,5995,9160,7258,1349,11028,1350,9542,10063,2594,11021,11219,766,1215,6842,1257,2706,2033,9453,2932,501,10375,4234,5148,3989,4796,5070,5799,10878,9648,9634,5148,5070,4861,2594,2706,6010,766,2033,5799,501,4234,4796,2932,8172,5179,10179,5986,3989,5995,5148,1137,3941,4048,180,6842,5286,6595,8500,4131,7354,3921,5088,3976,1461,6792,6707,9808,9464,7875,9661,6632,177,1325,156,4860,5541,8306,1586,6703,9552,3493,4513,4947,4670,10046,10112,6683,4240,4100,4088,4950,145,5005,4740,8819,9983,8846,8829,8890,9258,9925,4355,4566,4337,6679,6710,3904,9910,6986,10229,4023,5331,1954,7005,3026,6863,3744,2894,8615,10227,6684,5542,6694,7156,10523,10063,8031,9373,4233,4767,585,2054,4045,11304,3213,6632,104,10472,11302,4875,11619,4455,5995,5179,3059,4739,4234,8793,10212,4596,9453,11644,4741,11455,10375,1490,9993,9052,4178,640,10128,8745,10473,4773,11251,11229,10925,10920,11186,11184,11182,11231,11177,11179,11181,11252,11175,11176,10921,6518,11173,11174,11037,11183,6519,6523,11178,1704,3442,7698,7843,7844,7845,7868,11185,10924,4297,4298,4299,9631,7843,6220,3883,3896,3891,3893,6493,3885,3890,8273,3887,3894,3897,3892,3888,3884,3889,3895,8274,10922,6537,6505,4296,6506,6536,6534,6535,6532,6538,6197,3515,10923,529,541,531,545,542,540,539,538,537,536,532,543,528,527,526,6042,553,550,548,547,554,9665,10053,10544,10975,11221,10948,549,535,524,10947,8240,6533,6532,6042,551,11241,10194,525,8332,9432,9435,10326,11240,11156,9431,9434,11241,9427,9428,11242,11406,11405,10326,8243,10606,547,11153,10560,11160,8327,8311,9416,9412,9409,11046,11151,11154,10556,10201,10139,11161,11054,11055,11139,11152,10559,10562,9593,9908,10136,9891,9894,10096,10101,10103,10102,11154,10100,11407,8245,9414,8325,8319,9415,8332,8318,8307,8249,9410,8248,9424,8247,9425,9426,8246,8308,9182,9414,10326,11153,272,4146,2781,3874,2779,2780,2785,6443,10963,2787,2791,9436,2778,4224,9589,9183,8883,8330,10926,10927,10931,9383,9867,11109,8945,8946,6688,10232,7600,10928,7636,810,8327,9430,9592,10137,10645,10643,10641,10639,6198,6199,11430,11252,11176,11218,11493,8586,8682,9084,7546,9407,9920,10565,11147,10238,7694,8584,8585,10463,179,178,177,11324,11219,10938,10750,7631,11019,8618,7870,9993,11455,7810,9655,9554,8443,8050,11369,9520,9522,4752,10229,958,3493,7761,8793,9925,2261,8222,9195,3595,7019,9661,6710,3059,6876,1461,1520,11644,9418,180,233,10278,10823,566,173,28,11228,1370,1210,1207,956,1056,466,3872,2451,1741,923,57,1533,3392,1234,1145,3189,2725,1398,2736,9675,1198,2776,1425,9533,2677,2995,3014,4762,4784,4785,173,5089,4788,4690,8894,5756,5112,5143,3189,2992,5756,5251,7172,1537,7304,9453,9052,24,3327,3860,10526,4234,8798,8893,501,4701,5996,10375,3048,11812,5179,3989,766,6261,4708,3830,9378,4779,947,4731,4519,4029,8220,6740,9300,10836,11121,5799,10056,11690,9879,9030,1616,9980,10050,10473,10065,11020,11235,8999,9937,10568,5339,5545,11495,7126,7920,8548,5817,7883,4460,608,2933,1699,6858,3080,7839,9372,10243,11784,1347,4258) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC