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,714,4362,6642,6644,4788,6780,6766,6832,3549,5334,6709,6766,6589,6548,6584,6811,2590,4146,6366,1044,5883,6984,1462,5848,6843,3302,7019,4355,5020,1998,4185,3963,5386,5400,5322,5215,1230,5917,1586,5996,24,3913,5764,4082,5885,6117,6792,3595,2992,6104,6595,236,1381,6315,3860,5371,1371,1766,5331,6559,4061,5576,6154,2294,6011,4316,3368,4185,6560,6863,7019,608,501,5215,1954,6337,1690,1325,1521,1600,1272,6979,6595,5997,5371,6713,217,4985,7903,7761,7896,2594,2419,6862,7019,5142,5093,4659,2389,7751,233,7304,7972,1016,6010,5572,7973,6364,6103,8144,2023,6255,5763,8629,7640,3908,7607,7910,8629,8687,8629,8091,8093,2029,5148,6971,1257,5576,5995,6940,3989,1215,3830,2869,5799,1351,834,5995,1461,924,834,6365,7090,1453,7087,6633,358,6891,7143,5915,6102,7146,7144,7238,6947,7130,5912,5421,4154,6364,6863,5331,3428,4983,698,4765,6712,7127,1184,7239,3647,7773,7781,7751,6348,3346,3728,7592,6687,7554,7754,7755,7756,7068,7761,7840,7879,8222,7878,7910,5997,7363,7288,358,1453,236,6813,6104,6366,3247,6645,6189,319,663,447,7124,7115,7063,7219,8047,7263,7109,6138,6548,5371,5996,6364,6642,6140,6975,5142,7304,6870,4395,396,567,464,6782,6891,5551,1029,231,1834,6365,7146,2753,6809,3029,5421,1738,6845,2467,7634,6785,6364,2029,6813,6644,1402,7593,7838,7592,3850,1145,1425,1912,6659,6805,6591,7202,524,7009,6813,7037,6687,566,7546,7594,7359,4779,6123,7992,179,4767,1506,6559,6663,6876,5088,1520,793,464,5907,6001,308,585,600,6162,6168,358,3892,5647,4969,228,7258,6813,7304,6766,6954,6812,4217,7160,1830,6794,7144,6780,6155,2328,2506,6695,2863,6802,7838,3046,7783,4983,6767,2419,7602,2573,6160,7146,8020,4735,6159,725,3728,6811,8093,6588,7143,6605,6971,4570,6128,8096,8526,6726,8230,7822,8503,8836,6172,7304,8611,8184,8512,7887,8109,6348,8852,8489,7897,8869,6104,8869,8032,7850,6809,8118,6845,8903,6104,9075,9116,4860,8630,9052,3725,7920,2023,8500,7839,585,8948,9366,4220,9354,2925,8933,9369,1490,8955,9541,8806,9069,7022,9543,6135,9453,3549,8543,8305,6117,9647,9648,4765,341,9200,4652,9345,9374,9348,1349,8934,9346,9939,9249,9248,8795,8915,8805,8935,9924,6821,8492,9922,4566,9941,9928,4566,8501,4128,9402,4061,8031,10057,10208,9910,9117,10063,7759,4056,3936,10227,3100,1698,7138,6683,145,6986,6635,6793,6684,9991,4131,10039,6679,9363,7761,9258,10341,6595,7354,10548,7019,10688,8222,8793,8222,9195,9552,9925,10245,9993,5236,9000,9027,9282,10762,9034,3595,10879,10938,10528,10955,768,10893,8829,9352,1127,233,228,11127,9749,9065,3964,4635,4656,5046,5193,7760,11021,9038,8629,11122,308,4023,10246,6314,6779,6169,6674,180,148,6639,180,3493,2261,11324,6686,8808,11324,9379,7147,8923,8781,8257,3059,10572,10535,8539,6792,10573,11213,9467,10906,6713,8769,11489,11377,7077,11220,7156,11361,11439,7077,11361,11439,9629,11018,7077,4537,2294,9055,9204,8048,4046,10915,11124,9639,2019,11353,11599,7661,1895,11287,3288,10719,7662,10623,11125,11521,9638,10623,9220,6713,10042,10623,10042,7125,11126,11724,2923,10895,7084,5368,11678,11760,8709,8368,11237,11692,11501,11693,11803,11867,11868,10630,10272,8056,11867,10689,10623,11502,11777,10624,11647,1755,1272,8169,4985,1402,4424,2946,7937,7592,4144,5484,5872,2652,4510,1209,6119,2331,1245,4964,6221,4178,8324,6740,2021,7238,6270,1557,1380,8220,8247,5763,7300,217,6508,8345,8490,6512,6510,6103,6199,6533,2467,6373,6768,8244,2989,7923,1303,2374,735,9001,8151,6880,9243,6855,7594,510,9505,8869,9921,1052,9450,5839,9900,10228,4405,452,4800,10305,8135,2164,1557,2164,9931,11134,8435,8257,10086,8922,11352,9871,8262,11437,5997,1049,10741,11101,4362,8377,11519,4720,6806,8648,675,458,675,458,2989,4899,5402,6832,6691,8968,2328,5371,1521,6645,5582,3346,850,4362,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,4834,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,8970,3598,8613,3823,1988,1988,7861,6103,675,3409,5947,169,6740,7238,8220,8220,7913,7913,8733,1380,8516,8516,8563,9338,9784,7874,9762,9846,9488,8302,9322,435,4784,6174,9951,4788,4788,1207,8885,5251,6752,9049,1425,8171,1198,10235,8171,1533,6691,2467,6691,2447,7396,2294,1253,5817,5545,5817,1347,4258,7883,608,1699,7126,7920,8999,9937,7849,10065,10292,5339,10065,5295,6691,6691,8171,10568,8111,6691,10296,10211,10671,1296,10664,7591,9812,2294,1253,6631,4405,2473,9846,9668,9602,9814,9602,9814,9780,8947,6192,6113,6010,4985,1516,6001,2168,6559,4682,6118,5893,6158,2269,6154,508,6011,566,219,5222,5321,1425,5917,6782,6362,1603,3824,3856,4417,4617,5011,5208,6785,1398,2911,3216,6780,423,5837,6136,6806,6691,6973,6972,6947,255,1370,6156,6157,5222,239,6059,7299,7034,7023,7303,6795,7206,6633,6981,4788,1029,6337,947,1126,5334,1325,4432,466,3549,156,566,5582,3760,311,1738,464,7904,6192,6813,4218,435,7833,1245,4385,1207,2776,3761,7928,6163,5542,1532,1600,698,236,3131,8557,5011,8614,8535,8554,8550,8614,8305,1029,8547,2331,4983,7861,6712,7602,2737,7599,5143,8871,7928,6778,156,3875,3046,3531,4730,4765,5893,6813,5915,308,6156,9448,7982,8151,6644,6767,7938,9403,9307,6829,801,7913,6953,6894,665,9889,9926,9933,93,6163,8284,9665,10067,9953,9721,10046,9722,9449,9545,9603,10118,9754,10055,10145,9723,9835,9836,10112,9942,7812,10679,10113,10501,10512,10495,10628,10626,10697,9724,10237,10353,10358,10366,10482,10608,10497,10610,10876,10715,944,11330,7889,1886,11291,10294,11287,1210,10877,11101,10938,11136,10935,11134,11200,6898,11232,11347,11290,4899,9558,11233,10684,10733,4603,4602,4600,4599,11358,9728,11364,7019,8222,9993,11219,11324,3595,9195,9552,9925,11027,11112,11115,11127,11435,11552,11738,11449,11447,11456,11586,11236,11460,11551,11372,11622,11825,11371,11360,11699,11773,11524,11135,11774,2749,2783,2799,5454,7816,8714,2913,8485,2253,5564,6890,9103,2490,6622,2946,8689,9390,6001,9391,5839,7872,3074,314,4800,6174,7206,3358,9258,391,452,10454,5827,10337,10741,10761,10649,5839,4923,9031,10226,11010,9962,9888,9403,9771,8831,6806,9872,8520,8815,7970,9884,122,9898,5635,4386,9790,9835,2761,10181,8814,8730,4512,2024,10236,6839,8826,7824,7820,9786,5917,9883,9967,9202,10182,9612,9736,9959,9868,2168,6850,8541,8389,9767,9310,9627,9117,5371,389,3073,6354,3070,6689,7753,8088,7752,8822,2999,8172,5363,8627,9037,3071,8780,10519,9870,8515,9496,10685,9391,11074,10868,10552,9168,10041,9295,10672,10673,4510,5872,10961,11073,7130,9838,8972,9215,4218,8305,6780,3549,2388,5334,8955,8019,5582,265,744,3850,2331,4964,4563,4164,4706,239,8995,9300,8628,8097,9647,5729,9864,9838,9897,9900,567,7634,576,7635,9381,10017,10041,10092,9617,10094,1912,2328,1029,1516,2052,5420,10141,6899,1770,2117,1771,1766,6177,4535,9389,9387,6849,4125,9193,9235,10297,4563,10148,9914,4405,5917,9986,5305,933,2261,7299,9105,4947,3522,9126,8706,8560,10259,10535,8019,111,7822,9164,9065,10781,10236,4395,10021,8182,10823,10877,10658,10974,464,10937,9164,9065,10956,4801,3261,1092,5839,9941,10922,10912,10923,9014,10039,6204,9799,7037,2122,6806,9378,961,5995,10188,4029,1770,1765,9951,9258,10056,10212,5421,3014,7921,8967,8257,6367,9116,10526,9418,10669,4406,10039,9418,223,10518,10935,10919,3913,10375,1371,2594,1988,11228,10892,10665,10649,9904,223,10518,10663,8970,10868,9377,9244,9377,11166,8388,8257,450,8279,8279,3908,9959,9368,9367,7670,9954,8648,10933,9161,4800,9649,10077,4401,4079,7874,10655,10702,9135,10976,10187,10768,10891,207,6953,10000,10771,9889,8639,10769,9955,10172,10185,1209,11108,721,10171,7250,9736,8446,10226,8444,8740,8424,8568,8447,9199,8737,9658,9053,8741,10816,8962,7284,8445,10834,8061,8073,7890,7264,8575,8641,130,5961,7833,9561,7714,1343,11025,9968,1378,7283,8144,10550,7639,2079,11305,8144,6138,9245,11170,7280,11433,8098,10861,7279,7951,11332,9247,11195,9674,7286,11280,7084,10655,10191,1970,11225,1173,7251,7269,8653,8279,7037,7587,11654,11434,11675,11654,11800,2506,7288,6102,8370,9158,11626,11692,11693,11468,11674,6805,10944,10945,10584,10583,6426,11266,10912,11134,10713,4349,6894,2913,11468,4405,4770,11195,10785,10294,7147,5827,8520,5255,6622) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC