select offers.* from `offers` where ( (offers.status=1 and offers.published=1 and offers.agentie_id='7') or offers.id in (46274,46194,46081,45971,45782,44902,45559,45508,39350,42660,45363,45235,38556,43016,43988,44876,39830,44874,39483,12301,44990,44982,44143,44581,43927,44054,44366,43320,44313,42165,43621,44115,44055,42904,43691,43965,41957,41956,30212,43827,43728,43726,43501,43500,43194,42284,41314,41082,21794,39751,41348,40822,40653,40623,40597,40570,40255,40095,36531,39761,31720,38929,38785,38824,38787,33775,29323,20562,31437,30061,26562,24211,22748,20605,11266,46268,46169,46230,46225,46209,46142,46148,46145,44046,44008,45715,45560,44116,45486,45701,45554,45561,44233,44689,45421,43437,44580,45111,45281,43996,44718,44009,44691,44699,41131,43985,43549,43524,44403,44471,44254,44443,43706,44001,44006,44007,44255,44359,44231,44088,44091,43882,44125,44015,43245,43020,42788,42090,43240,43509,42751,43468,43766,43791,42036,38048,38312,40617,40767,41011,41977,41849,43019,43560,38560,43304,43199,40461,43293,43200,42940,43081,39706,42976,42848,42809,42770,42488,42062,42261,42276,42277,42427,24217,41969,42150,41637,41713,42044,42076,41947,41732,37481,37959,38050,41496,41717,41622,41621,41572,41571,41001,40099,37342,36065,41085,41237,40208,40156,40522,40746,40785,38537,40377,40333,40440,40556,40527,39368,40456,40459,36325,40446,40426,28725,40262,39302,38776,38677,39295,39794,39644,40105,39912,39998,39911,39452,39453,39462,38885,39605,39585,39655,39710,36751,39541,39708,39475,39631,38376,39570,39582,27349,39548,39568,39566,39564,39555,39305,39545,39539,39538,39398,39476,39472,39470,39464,39450,39448,39431,28660,39341,38585,39388,39379,39378,39315,39297,38944,38766,37827,27985,28375,37919,37248,36808,37341,36778,37374,37344,37277,37279,37274,37276,28201,28360,36779,36625,36610,36548,36367,36283,36284,35202,27661,28367,28729,22231,22058,27352,27090,27353,28100,28108,28117,28197,28225,27376,27656,29046,21964,46299,46280,46211,46144,43498,46083,43594,43570,40316,44367,41464,43326,44163,43961,44178,44702,44754,44073,44302,43592,43743,42263,43953,44536,44164,44483,43459,44447,44444,42168,42475,44041,44304,44109,44243,43585,42226,43556,43767,43657,44129,44108,43764,43409,43408,44069,44068,44061,44060,44014,43461,43478,43880,43412,43345,42249,41201,41475,43829,43779,42223,43017,43057,43763,43761,40372,43702,43700,40787,43587,43586,43402,43555,42237,43569,43567,43540,42476,43527,43479,43011,43414,43120,43410,42107,42087,43378,43363,42995,43256,43244,40346,40065,43137,42812,43122,39729,40762,35105,37283,38262,42993,42979,42974,38368,41295,42857,41600,42808,42579,42393,42153,42490,42489,40142,42443,40359,41335,41665,40691,41800,41290,40357,40732,38284,41211,41027,41769,41265,41689,41356,39918,41679,41633,38908,41368,41355,40462,41327,41311,40310,41224,41235,41199,41133,41138,40240,40777,40494,41000,40249,40086,40432,40541,40511,40536,40290,37620,40520,40084,35718,40502,40474,40465,38264,40233,40445,40318,40313,39731,39765,39771,39800,39804,39840,39664,39671,39746,39752,39768,39856,39897,39883,39844,38280,38370,38433,39347,38913,38328,38383,38719,39584,38261,38379,38912,34126,34636,38739,38688,35248,37684,38742,36790,34602,34638,37821,37337,38898,33540,33542,34125,34634,34635,34637,37859,37621,38310,35249,37967,37922,37658,37467,37555,37547,37375,36876,33051,33090,35292,35218,35198,35174,35146,35136,35115,35111,35109,35107,35090,35087,35086,35085,34962,34959,34246,33922,33795,33774,33734,33644,33579,34910,34803,34800,34799,33262,34658,33083,34210,34211,34255,34287,34373,34487,34660,34286,33514,33353,33541,33513,33349,38399,37939,37937,35252,36570,36501,36315,36344,36317,36316,36297,36295,36290,35539,36281,36280,36266,36244,36243,36240,36234,36232,36222,36151,36049,35994,35554,35934,35550,34311,34312,34313,34314,35549,35551,35552,35750,35751,35752,35753,35754,35755,35756,35757,35758,35759,35760,35761,35741,35738,35547,39426,41763,41762,41038,40516,39425,39421,38798,39235,39237,39238,39264,39265,39266,39267,39320,39321,39322,39323,39324,39325,40183,40176,39973,39615,39326,39328,39330,39417,39418,39420,39422,39423,39329,39327,39236,39208,39207,39206,39069,38954,38953,38952,38951,38947) ) AND offers.type in (2,3) AND offers.transaction_type='Vanzare' ORDER BY last_updateÔłĘd_direction=DESC DESC LIMIT 0, 10You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'łĘd_direction=DESC DESC LIMIT 0, 10' at line 7