-=HELLBENDER=- Posted March 2, 2011 Report Share Posted March 2, 2011 Sveiki.. Veidoju priekš spēļu servera UCP, kur varētu rediģēt status, bet pie query metas errors un neizdodas rediģēt lietotāju kontus.. Errors: 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 ' phonenr = 0, banned = 0, ' at line 15 Kods: $sql->query("UPDATE ".TABLE_PREFIX."users SET username = '".$uname."', sex = ".$usex.", level = ".$uplayer.", adminlevel = ".$uadmin.", cash = ".$upocket.", account = ".$ubank.", famnum = ".$uleader.", team = ".$ufaction.", rank = ".$urank.", job = ".$ujob.", skin = ".$uskin.", jailtime = ".$ujailtime.", npcrep = ".$unpcrep.", oocp = ".$uoocp.", phonenr = ".$uphonenr.", banned = ".$ubanned.", materials = ".$umaterials.", drugs = ".$udrugs.", age = ".$uage.", lighter = ".$ulighter.", cigs = ".$ucigs." WHERE id=".intval($core->get['uid'])." "); Izsecināju ka, ja noņem kādus ~8 nost, tad nav errors. Par garu query? Centos sadalīt, nesanāca. Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted March 2, 2011 Report Share Posted March 2, 2011 uztaisi pirms $sql->query() vienkārši echo tam visam un parādi, ko izvada: echo("UPDATE ".TABLE_PREFIX."users SET username = '".$uname."', sex = ".$usex.", level = ".$uplayer.", adminlevel = ".$uadmin.", cash = ".$upocket.", account = ".$ubank.", famnum = ".$uleader.", team = ".$ufaction.", rank = ".$urank.", job = ".$ujob.", skin = ".$uskin.", jailtime = ".$ujailtime.", npcrep = ".$unpcrep.", oocp = ".$uoocp.", phonenr = ".$uphonenr.", banned = ".$ubanned.", materials = ".$umaterials.", drugs = ".$udrugs.", age = ".$uage.", lighter = ".$ulighter.", cigs = ".$ucigs." WHERE id=".intval($core->get['uid'])." "); Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 2, 2011 Report Share Posted March 2, 2011 Izsecināju ka, ja noņem kādus ~8 nost, tad nav errors. Par garu query? Centos sadalīt, nesanāca. Kverijs nav par garu, visticamak ka megjini warchar tipa lauka ievadit datus bez pedinjam kautkur sheit .. npcrep = ".$unpcrep.", oocp = ".$uoocp.", phonenr = ".$uphonenr.", nezinot tabulas lauku strukturu neko nevar pateikt ... P.S. un parbaudi vai lauku nosaukumi ir pareizi uzrakstiti (vispar eksistee) Quote Link to comment Share on other sites More sharing options...
-=HELLBENDER=- Posted March 2, 2011 Author Report Share Posted March 2, 2011 UPDATE users SET username = 'Toksiks_Toljstiks', sex = 1, level = 0, adminlevel = 0, cash = 295, account = 137, famnum = 0, team = 3, rank = 0, job = 0, skin = 26, jailtime = 0, npcrep = 0, oocp = , phonenr = 0, banned = 0, materials = 0, drugs = 0, age = 18, lighter = 0, cigs = 0 WHERE id=3 DB it kā viss kārtībā (vismaz man tā liekas).. Bilde: http://www.bildites.lv/images/zfz0gqkxkv0y0sl4b4lx.png Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 2, 2011 Report Share Posted March 2, 2011 (edited) un shis tavuprat ir normali ? oocp = , kaa minimums oocp ='', visticamak ka mainigais $uoocp nav nemaz definets attiecigi shi ir taa reize, kad paradas PHP minuss ka ljauj izmantot nedefinetus mainiigos Ja buutu ieprieksh vinju definejis (pieskjiris kadu vertibu), tad kljuda neparadiitos ... edit: iesaku koda izstrades laika ieslegt arii error Notes, kas paradiitu ka tiek izmantots nedefinets minigais ... Edited March 2, 2011 by Grey_Wolf Quote Link to comment Share on other sites More sharing options...
-=HELLBENDER=- Posted March 2, 2011 Author Report Share Posted March 2, 2011 Kļudu atradu.. Būtībā pavirša kļūda. $uhoocp = intval($core->post['oocp']); Paldies! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.