MySQL Error: 1064 : 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 ' ic1_user.id, ic1_grundrechte.name as recht_name, regist, ic1_user.name ' at line 2 in Query: SELECT id, staat, name, gebdatum, status, recht, posts, regist, geschlecht, cpoints, fwarn^, ic1_user.id, ic1_grundrechte.name as recht_name, regist, ic1_user.name FROM ic1_user LEFT JOIN ic1_grundrechte ON ic1_user.recht = ic1_grundrechte.id ORDER by recht,ic1_user.posts DESC LIMIT 0,20 Debug backtrace: @ mysql.php:32 -- debug_bt() @ mysql.php:50 -- db_check_error(...) @ memb_list.php:33 -- db_query(...) @ user.php:24 -- require_once(...) @ index.php:24 -- require_once(...) Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\test\include\includes\func\db\mysql.php on line 67
Hier meine member_list.php:
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: User :: '.$lang['listofmembers']; $hmenu = $extented_forum_menu.'User <b> » </b> '.$lang['listofmembers'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $limit = 20; // Limit $page = ($menu->getA(1) == 'p' ? $menu->getE(1) : 1 ); $MPL = db_make_sites ($page , "" , $limit , '?user' , 'user' ); $anfang = ($page - 1) * $limit; $tpl = new tpl ( 'user/memb_list.htm' ); $tpl->set_out ( 'SITELINK', $MPL, 0); $filtername = isset($_GET['filtername']) ? "WHERE prefix_user.name LIKE '%".escape($_GET['filtername'],'string')."%'" : ""; $class = ''; $erg = db_query("SELECT id, staat, name, gebdatum, status, recht, posts, regist, geschlecht, cpoints, fwarn^, prefix_user.id, prefix_grundrechte.name as recht_name, regist, prefix_user.name FROM prefix_user LEFT JOIN prefix_grundrechte ON prefix_user.recht = prefix_grundrechte.id $filtername ORDER by recht,prefix_user.posts DESC LIMIT ".$anfang.",".$limit); while ($row = db_fetch_object($erg)) { if($row->gebdatum=='0000-00-00'){$age='n/a'; } else {$age=getage($row->gebdatum); } if(!empty($row->staat)){ $flag='<img src="include/images/flags/'.$row->staat.'" border="0">'; } else { $flag=''; } $state['0']='inaktiv'; $state['1']='aktiv'; $state['2']='gesperrt'; $class='Cmite'; if ($class == 'Cmite') { $class = 'Cnorm'; } else { $class = 'Cmite'; } $rangcount=rangcount($row->id,$row->posts,$row->cpoints,$row->fwarn); $rang=userrang($rangcount,$row->id); $spezrank=spezrang($row->id); if(!empty($spezrank)){$rang=$rang.'<br/>und '.$spezrank;} $ar = array ( 'NAME' => getgender($row->name,$row->geschlecht).' ('.$age.')', 'RANG' => userrang($row->posts,$row->id), 'CLASS' => $class, 'POSTS' => $row->posts, 'UID' => $row->id, 'DATE' => date('d.m.Y',$row->regist), 'GRUPE' => $row->recht_name, 'RECHT' => getlistrecht($row->recht), 'STATE' => $state[$row->status], 'FLAG' => $flag ); $tpl->set_ar_out($ar,1); } $tpl->set_out('filtername',escape(isset($_GET['filtername'])?$_GET['filtername']:'','string'),2); $design->footer(); ?>
Und einmal hier wenn man auf einen User klickt um seine Details zu sehen:
MySQL Error: 1064 : 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 '' at line 1 in Query: SELECT recht FROM ic1_user WHERE id = Debug backtrace: @ mysql.php:32 -- debug_bt() @ mysql.php:50 -- db_check_error(...) @ pointsys.php:50 -- db_query(...) @ user_details.php:23 -- rangcount(...) @ user.php:24 -- require_once(...) @ index.php:24 -- require_once(...) MySQL Error: 1064 : 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 '' at line 1 in Query: SELECT b.name,b.id FROM ic1_groupusers a left join ic1_groups b ON a.gid = b.id WHERE uid = Debug backtrace: @ mysql.php:32 -- debug_bt() @ mysql.php:50 -- db_check_error(...) @ pointsys.php:126 -- db_query(...) @ user_details.php:38 -- getteams(...) @ user.php:24 -- require_once(...) @ index.php:24 -- require_once(...) Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\test\include\includes\func\db\mysql.php on line 71
Hier die Userdetails.php:
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $uid = $menu->get(2); $abf = 'SELECT * FROM prefix_user WHERE id = "'.$uid.'"'; $erg = db_query($abf); $row = db_fetch_assoc($erg); $avatar = ''; if ( file_exists($row['avatar'])) { $avatar = '<img src="'.$row['avatar'].'" border="0">'; } $row = db_fetch_assoc($erg); $regsek = mktime ( 0,0,0, date('m'), date('d'), date('Y') ) - $row['regist']; $regday = round($regsek / 86400); $postpday = ( $regday == 0 ? 0 : round($row['posts'] / $regday, 2 ) ); $rp=rangcount($row['id'],$row['posts'],$row['cpoints'],$row['fwarn']); $ar = array ( 'NAME' => $row['name'], 'ROWSP'=>10, 'JOINED' => date('d M Y',$row['regist']), 'LASTAK' => date('d M Y - H:i',$row['llogin']), 'POSTS' => $row['posts'], 'postpday' => $postpday, 'RANG' => rangbild ($rp), 'AVATA' => $avatar, 'SRANK' => spezrang ($row['id']), 'RECHT' => getlistrecht($row['recht']), 'POINTS' =>$row['cpoints'], 'RPOINT' =>$rp, 'GAMES' => getteams($row['id']), 'VERW' => verwarnstu($row['fwarn'],0), 'dze'=>getmedal(1,$row['regist']), 'fze'=>getmedal(2,$row['posts']), 'wze'=>getmedal(3,$row['cpoints']), 'cme' =>getmedal(4,$row['medal']) ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> Details von '.$row['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); $l = profilefields_show ( $uid ); $ar['rowspan'] = 4 + substr_count($l, '<tr><td class="'); $ar['profilefields'] = $l; $tpl->set_ar_out($ar,0); $design->footer(); ?>
Hoffe mir kann jmd helfen
Grüße
verwendete ilchClan Version: 1.1