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,1768,6519,6523,5864,1766,6532,2720,6498,6507,4300,6222,6497,6515,1767,2795,6200,4301,4936,6503,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,387,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,5148,4234,4121,4121,6571,5719,2706,735,1257,6152,6151,3359,6596,261,314,3074,3702,5996,7915,3334,7722,7938,1811,1831,567,8250,7992,1783,8316,3883,8411,8732,2520,4296,8892,546,9152,8683,8475,8627,9037,7666,9300,7174,8648,8948,7967,470,645,4008,6564,6565,6572,6575,1461,1593,6562,3797,4165,1092,744,6568,3645,7063,6998,467,7119,7095,4164,1600,6521,4423,7089,7093,4964,6527,1474,7121,6522,1098,6504,6735,7115,6576,7115,6902,7125,7029,6503,6901,7047,6523,6996,7223,7235,7001,7029,1460,2456,7233,6675,3418,7013,652,2917,2696,7112,2956,1425,7249,7276,341,3447,943,1869,7231,3760,2446,3454,7234,2456,2454,3610,1893,1765,944,7034,2151,1829,7089,2974,6588,7272,7271,6168,7272,6350,7271,7273,3417,7296,2334,6530,2671,7280,2653,5371,6365,7241,6676,7258,6993,2876,7057,7106,397,4021,6678,6726,6518,6512,6371,726,6528,6530,6529,6531,7691,7689,860,7692,650,7686,7699,7681,4224,6530,313,810,7753,272,7275,5066,7844,3784,7661,7670,7602,7662,7108,7084,7265,7268,7170,7168,7599,1771,1767,1207,1769,1765,1768,6669,7839,5386,1165,6359,5332,6521,4701,1266,6792,6201,6198,6200,6199,4282,4301,4299,4293,4302,4297,4301,3515,7693,6505,6533,6532,4286,4304,1704,4289,7972,7973,6218,6197,6501,6497,7698,6498,6215,6216,6496,6222,6221,6212,6223,8244,8249,8246,8243,8339,8245,8247,8248,8318,8317,8319,8320,8334,8326,8337,8330,8327,8315,8331,8335,8322,8333,8325,8324,8323,8336,4301,4299,4302,4287,4291,4294,4296,4300,4293,7963,4289,4304,3515,7697,7694,7695,7696,1704,7608,7610,6548,5691,7695,3442,6303,7677,7168,7167,7170,7165,7163,7173,1779,6286,7164,7174,7169,7172,7693,7166,7171,4463,4470,4464,4486,4473,1571,2824,2780,2785,2795,2783,2778,2779,2781,2782,2784,2789,2787,2794,2791,2802,2801,2806,2805,2786,2808,2811,2812,2799,2815,2816,2817,2818,2820,6489,6443,2821,2822,2823,2826,2827,2828,6442,2825,7834,7812,7879,7836,7878,3131,3428,6521,7663,7764,7762,5091,7568,3520,7570,7246,7569,1656,8071,1770,7151,6531,7650,7649,4301,4293,4289,4299,4286,4287,4294,4292,7643,4302,7963,4297,4298,2766,800,5024,7079,1085,6103,6780,972,8300,5371,8531,1086,7599,3519,979,7906,8587,7568,6532,4804,8836,8814,1667,6306,8520,9038,8816,6618,9030,8092,801,7808,6493,8271,3884,8273,3896,3891,3889,3890,8272,3894,3893,3895,3897,8274,8272,3883,3885,3888,3882,3881,4300,4299,4302,4297,4286,4293,4304,4282,6197,6201,4293,4289,4296,4298,4294,4292,4290,6200,9631,7963,4300,9633,4286,7610,9632,7696,3442,1704,3515,7608,4087,4766,7719,9383,10245,9867,11268,93,4730,7195,3898,9156,8988,7199,9409,8882,6928,9173,9172,8700,9408,9176,9536,6768,8971,1730,8387,8858,9146,9145,9147,9144,9143,8881,9150,9190,9191,240,9411,9151,8987,9192,9767,8986,8654,8656,9592,8530,8529,536,535,7694,7695,7696,7697,3881,3884,3888,7868,3890,3883,8531,3882,3895,3893,7196,7198,7702,6937,7196,7198,8655,8665,8581,9993,8879,9088,9178,7705,6270,9633,3896,3894,9177,9175,1765,5386,6656,6985,9217,8168,2856,7870,9154,9892,10100,9155,9792,392,386,9891,10097,10099,9894,9906,9891,8242,9903,9951,8274,3887,3885,10136,10147,10102,9909,9908,9950,379,10193,3889,3892,9535,8329,9535,8329,6354,9907,7972,3070,3073,10036,4302,5996,9906,9879,3071,6689,6688,7752,8088,8627,9037,9970,10254,8946,8727,10056,9665,10053,9473,9474,10298,9475,8698,8681,9670,9669,9671,9131,9673,9672,842,10477,8582,10429,9906,9854,6499,1765,9411,1730,9555,7963,8665,7698,6496,1771,1767,2780,9213,1769,1768,1766,6746,6222,4512,8154,10098,4121,3896,3070,7693,6381,3073,9377,2520,6689,6688,8946,2780,8278,4701,2778,4287,9377,9592,2816,2787,2786,2802,2801,2783,2782,2818,6354,2820,8983,2812,4302,9799,7752,6193,8627,8088,9996,7753,8727,10053,8943,8727,8944,7881,9679,9037,9665,9822,9037,7696,7881,7610,9679,4286,7694,4297,9905,7695,3442,4304,9909,9903,4300,4291,4287,4298,4293,4296,7963,4290,4289,8945,6688,9867,2791,2828,9867,2825,2785,6489,2823,2826,2824,6197,9632,10232,9631,9633,6201,8946,6198,6200,7608,1704,6199,6538,2822,2821,6534,6535,6537,6506,6501,10139,6532,6533,6536,8323,6214,6216,8278,9534,9536,8276,8275,10176,8003,7782,2815,735,9781,8589,8007,10044,397,10257,979,6443,9011,8667,3898,7636,9129,8566,10372,848,1368,10072,7580,9300,6740,3841,7238,10220,9300,324,4701,10056,7568,9383,9543,10552,10544,2749,9072,8991,3877,7762,4,4520,10647,10612,10646,8946,10641,10642,8871,10260,6311,7024,1230,10531,3425,9669,9624,9131,9671,9670,9673,9672,7171,7172,7170,7174,7165,7173,7166,7164,8681,8698,6528,4146,8817,9888,10861,8,3874,6259,7677,10836,9300,4224,8888,9304,10914,10954,8432,10963,9338,10856,10857,7772,510,7771,7770,511,512,10818,7637,9473,9475,10298,10924,10067,10443,5995,4178,446,10212,9418,1257,10098,5459,814,9667,7903,11109,7143,11121,5995,173,7636,365,392,11263,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,387,392,6082,372,365,8530,8529,8201,6076,9217,10161,5995,7913,10263,10213,8882,8788,8786,8451,10194,1770,8910,10254,6538,10217,9406,10215,9601,379,6354,7020,3070,6536,3073,6533,3071,4282,6689,10158,510,10333,1768,1769,10332,10323,1771,7610,10188,7311,7753,5691,6354,7697,7752,4300,8088,4296,9951,9386,4299,4301,810,3070,8220,7238,993,10752,8340,7194,6386,7196,6191,9111,8599,8248,9165,8244,8883,9114,6146,8246,8881,1266,858,9119,9120,8341,8307,6375,8247,8311,8699,3891,8700,8242,8873,9425,9424,8337,9433,9432,9431,8334,9534,9536,1462,8326,3402,9592,5770,9114,9414,9411,8342,9518,9427,9144,9522,9517,9426,8332,8335,1990,8598,9412,8249,8317,8328,9409,6382,8245,380,8596,9436,9386,9428,9480,8874,6139,9500,9183,9535,6371,9590,381,9591,8333,3883,9588,3891,3882,3884,3892,3881,6526,3890,3896,3893,9587,3894,8168,8597,8323,8243,8241,9589,9588,9416,8326,8325,8319,8316,8329,9434,9408,9412,8324,9908,8330,10102,10101,9868,10096,10099,10137,10139,10140,10147,10136,10138,10152,10153,10151,10198,10200,10195,10199,10202,10213,10217,10214,10216,10201,10215,4294,10194,10218,8649,10197,4296,4291,4292,10280,4282,4293,10098,4293,9633,10098,10333,10331,10330,10333,10331,10332,10323,10324,9429,6201,10336,6199,9631,10322,10193,10100,10551,10328,10557,10560,10563,10607,10555,10556,7189,10326,10327,10562,10335,10103,1770,1767,1771,1769,1768,1766,10646,10643,10753,10647,5756,8894,10645,10639,10641,10752,10640,9880,10644,8887,5863,6820,6727,10874,10962,11073,2787,2824,7567,9493,7569,7762,6534,2801,6505,6532,4282,6514,6212,735,6496,2786,6216,810,4298,4293,6526,6222,4294,4944,4942,4945,4941,4940,10531,4943,4939,4938,8478,2183,8343,9114,9592,9410,8329,8245,8323,8242,8599,8320,8332,10153,10200,3442,8700,7696,9424,9407,8334,8682,7546,7631,9084,8874,8318,8584,8316,6496,8317,8597,8335,10217,10217,10214,8598,9114,10216,10215,10336,10101,8584,10213,8586,9182,8310,8307,8314,8244,8307,8311,8308,979,10521,9729,10545,8313,10334,8309,8312,8336,10335,10607,10522,3070,6354,11069,8154,11071,8002,11067,9720,10868,10526,7752,7753,6688,8946,8088,10486,6426,6854,6545,6425,6423,6421,9087,6922,10489,8267,6426,6424,10486,11817,7048,9925,8527,7563,7385,10332,10327,6197,10607,10328,1411,7567,2820,4297,10558,3515,10563,6201,10218,4299,8332,10158,5386,7569,10137,3442,10099,4292,10333,2826,9593,9430,10200,10560,7696,4293,10322,9114,9426,9424,9409,4298,9112,9113,8883,2824,10136,9894,9633,4304,10215,8662,9908,4294,6200,2825,10218,2823,8727,1765,9120,8326,8627,1771,9626,4296,1768,7174,9037,6689,1767,2808,1766,510,1771,9473,8944,9669,9407,7752,7677,8627,9920,8432,9474,10154,10725,10642,8971,10139,9665,9475,10155,9601,10298,10729,9493,10238,10522,9383,10637,9867,8586,10152,5576,10877,7636,10232,4386,848,1368,9687,10828,7580,9031,10641,11048,11008,6800,11046,7870,11088,11019,10329,10864,9854,9911,10645,11007,10565,9912,10463,10647,11047,10866,10923,10646,10154,4464,11014,9046,7019,7165,10155,7166,4486,8780,9215,4470,7761,10157,7677,10156,7551,8222,2818,10519,11051,8793,4855,2816,11109,11183,11184,11022,11192,10706,11193,9168,10053,11191,2780,11241,11231,11242,9690,11149,2791,10544,3897,10102,9114,8331,8336,8529,8335,8530,10322,8832,365,3893,10334,10335,9633,10100,9632,10607,8307,8273,9411,6199,10153,9631,10332,6200,10152,6197,3897,6198,8274,4304,3884,3889,4291,3891,4292,8272,4286,3896,4300,4298,2520,3895,2522,4299,9483,3888,3889,4293,3881,7963,3885,4294,3894,4297,3892,4287,3883,6493,9192,3887,9409,6538,9182,6537,8334,6536,8874,6534,8599,6506,8329,6505,8699,6533,8700,6532,6359,810,1765,7808,1770,1771,1767,1769,10799,1768,10551,1766,10336,10101,9418,9412,10102,9533,3872,8586,9839,3897,3073,10056,3888,3892,7170,3885,7753,3881,3073,3071,6689,10238,9535,10200,10139,10201,10197,10215,1768,8387,381,380,10199,375,7188,394,372,376,10217,176,9430,10322,4390,10545,1411,9137,4512,10521,10562,9587,10556,9589,9588,1266,8334,8337,10559,8342,10558,10557,10607,9429,10463,14,8341,10555,9593,10194,10561,9431,6066,9426,9436,10552,10551,10218,384,10330,10332,10331,4304,390,4684,9424,9425,9483,9433,9427,10563,4302,10606,4286,4287,4291,10728,7963,10519,1557,7698,7844,7311,7608,7610,6498,9631,7693,7694,7695,7845,7843,7696,7868,9536,4804,6653,7176,7179,7180,7182,7187,6652,7176,7178,7179,7181,11015,11014,7183,11013,7189,4386,6654,7184,7185,7186,11016,5635,8899,10796,10797,10926,10975,10930,7600,11109,10928,10927,7676,11082,10931,8681,6221,8698,6223,6740,7238,8220,9742,10229,2736,10274,10630,10270,1770,1765,1771,1767,8060,4302,1769,4291,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,6376,6989,6517,6234,10426,6271,2720,726,4282,4286,4302,6505,2720,4296,4304,4291,4300,8306,4535,2467,4834,8780,3131,8169,4131,8514,7903,182,2989,182,2522,5484,6117,7146,7615,7121,8910,9245,1402,9406,9116,7920,9431,9734,6744,9178,9408,8246,8244,8087,8067,9225,7704,6380,6416,6612,9734,9178,9501,9806,4286,4289,4304,4298,4299,4287,4292,4302,4296,7311,7610,4297,7083,7697,7695,7696,7868,7694,2951,3442,11184,11149,11183,11181,11252,11174,5297,11182,10920,1704,11037,11179,11178,11231,11173,11175,11251,11185,11229,11177,11176,11186,11016,9137,7608,7697,10821,10822,4282,4286,4292,4299,4300,4287,4301,4291,4289,4294,1704,4296,7696,4302,11028,4301,11228,10751,4297,4286,8816,9078,9257,4294,9483,9258,11085,2998,4639,4296,4287,10764,3913,11082,10672,6354,8933,3070,8681,3073,11439,3071,11438,6689,7753,10039,11476,7752,11324,8088,173,8627,10236,9037,10053,11477,9665,11101,10892,9037,9665,8816,11658,10053,10975,10544,11221,11359,2989,9383,3327,6616,3898,4199,4512,9116,11822,510,4316,735,2951,9378,4405,6441,554,7300,3073,9418,7024,8627,8088,6688,3883,573,3884,10228,10336,7985,549,550,6386,539,551,9483,7987,10072,10649,1765,8971,1771,5839,1767,7704,7706,1765,9949,2605,1769,11028,3877,10607,1768,1766,531,10044,9502,2822,6489,10963,2779,2785,2786,2791,2778,3359,2799,8192,2816,2522,7698,6596,510,4146,10067,9633,10922,10923,10924,10433,11017,8582,2808,2812,2781,8154,11071,11068,11067,9555,9554,8241,8244,3784,2817,6354,3070,3073,3071,6688,6689,7752,7753,8627,8088,11161,9037,6526,11238,2820,6521,2794,2789,3891,3877,2818,9665,10053,10544,10975,524,11221,526,9383,9867,529,6855,10232,8943,11407,8316,8944,9418,7881,10644,11390,11393,10640,8878,10645,374,11422,11109,11406,6538,11320,525,6537,538,6536,535,6535,542,6534,540,11321,6506,6505,6533,6532,4599,4598,8727,382,735,9184,9679,8596,6442,2824,7999,7998,10857,10866,11523,11131,10930,10931,7055,10387,10381,10390,10390,10386,10386,10488,6762,6916,6752,6759,6754,6760,6761,6928,6918,7162,323,11003,8696,8693,8656,4299,9483,4299,9483,4292,4293,10920,57,7953,10823,10725,9590,11161,10199,9829,9534,10822,3897,10980,368,1770,10239,10821,8232,11255,10443,10612,6270,8878,9483,9143,6749,6197,4297,9155,3881,7632,9217,4296,11320,4464,6742,9156,4301,6745,4293,9154,8983,9231,4298,8980,10957,4292,8879,9151,4300,10646,9147,9144,10640,4294,10645,9633,9146,5635,8729,6743,10639,4289,10752,10753,10642,10641,11427,10644,9792,11081,10643,10647,11080,4304,11321,4390,10545,10828,11076,11077,8982,8981,10637,11432,10520,9149,10827,10646,10752,11320,2605,1266,9137,10637,10647,10639,9949,1765,1770,11321,10645,11432,4390,11017,1685,11466,6484,11218,8585,11723,10176,8389,9767,8,8168,10466,7501,8489,9031,2506,9985,7869,1049,10742,10033,386,6270,8881,8880,10098,381,11121,384,3894,3895,3897,8607,11098,11239,8290,7986,11301,3888,7987,11022,3892,3891,3889,11295,3890,3884,11299,6261,8272,3883,4300,4292,4294,4298,4301,1770,4293,1765,1767,1768,1769,1766,11319,3881,3882,11317,6520,368,11392,1767,840,1769,1768,1766,4520,4714,10444,11254,11299,11050,10323,8980,6745,10555,11149,10325,10327,10328,10329,10330,10331,10333,10324,6216,6222,6220,6501,6499,6214,6221,6218,6496,6498,6497,7698,6223,6200,9633,11238,4296,4291,4304,4289,4292,4300,4298,9483,4293,4294,4297,4301,4287,7753,4299,8088,7752,8627,9037,11185,9665,10053,10544,10975,11221,6688,8727,8946,9383,9867,10232,8943,10827,11466,8824,10520,1266,4297,8324,10565,9920,4296,7646,3883,8323,4291,9591,8771,4304,7697,8154,7694,8002,4298,4289,6354,10327,8584,3070,8649,7546,10519,8618,7843,8682,9084,1704,7870,9407,7844,10238,7631,4121,7845,9920,9632,7695,9920,9633,6197,6199,6200,6493,7986,9631,6198,7985,6201,7987,8272,6260,3884,3883,3892,3897,8154,9905,3881,9909,9119,6526,8260,6520,6521,6373,6503,6523,10924,6504,10920,9903,8321,8241,10324,10563,10331,10329,9522,10333,10331,10329,8244,10323,10921,10922,4293,4282,4294,7963,4287,5792,3442,7696,6855,10565,10827,10750,7698,1766,6214,6499,6218,6221,9920,10238,6212,1766,9517,6496,6501,9515,8154,6216,6223,6497,6215,11069,6222,8586,11067,9084,9522,11252,11190,5383,11192,11194,11243,10797,11245,7610,11246,9407,8584,11181,11191,11251,6538,6503,8703,7172,11177,7567,11176,7170,6537,11175,7174,6536,7173,6535,11186,6596,6534,7165,11354,6506,7164,510,10639,10752,9518,9521,10753,7168,8917,3719,10637,7167,11320,11321,11461,11493,8585,11218,11466,10849,9520,10923,3894,11019,11422,11431,11459,11407,11240,8247,8242,10606,8703,11191,11193,3070,11375,11432,3073,6354,3071,6689,8088,7752,7753,2780,2789,2812,2791,11464,1589,11493,5792,2779,6896,2787,6688,4512,9129,7751,7972,7973,8946,7184,11148,11147,510,11146,11722,7770,7772,11656,11405,11615,11419,11618,11465,10278,8436,11723,4282,3997,11792,11421,10332,11677,11792,3327,11799,11696,11697,10522,7938,510,4294,10325,11617,11186,11419,11176,11251,11252,11429,11575,11194,9232,11245,11244,11243,11574,11190,11246,7972,3874,4146,11068,11878,11899,3888,5576,2869,3883,1351,834,3884,7019,8274,8222,7761,8271,9195,8793,7987,9925,9552,3890,8573,6526,3897,6520,766,6521,3882,7672,3893,11429,3881,3896,3887,11430,3894,7286,11750,3891,6521,11121,9609,7244,6493,3884,7280,11650,10920,10938,3895,8268,3888,10921,11427,3893,8343,8741,10921,11425,6521,10923,10834,9905,5383,9199,9909,535,9658,11186,3892,6520,3997,653,11212,4282,7086,7285,4298,11370,554,4301,9082,524,10827,6596,525,10888) ORDER BY , is_available DESC,(total_rating/no_of_ratings) DESC,title ASC,publisher ASC,active DESC,author ASC