ayzyyy Posted March 17, 2012 Report Share Posted March 17, 2012 Labdien ! Es meiginu uzlikt skriptu un izmet kludu . Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in/home/headz/public_html/inc/login.php on line 28 Ko tas nozime ? 28.rinda : if(mysql_num_rows($sql)>0){ Ko jalabo pasakit ludzu Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted March 17, 2012 Report Share Posted March 17, 2012 parādi pilnu kodu Quote Link to comment Share on other sites More sharing options...
daGrevis Posted March 17, 2012 Report Share Posted March 17, 2012 Kverijs feilo. Quote Link to comment Share on other sites More sharing options...
ayzyyy Posted March 17, 2012 Author Report Share Posted March 17, 2012 parādi pilnu kodu Nem apskaties kodu paskaties un pasaki kas par vainu ! <?php mysql_connect("localhost", "sql_user", "pw"); mysql_select_db("db_name"); function login(){ echo ' <form method="post" action="f/index.php?act=Login&CODE=01&return=http://headz.woano.lv"> <table> <td> <input name="UserName" value="Lietotajs" type="text" /> <input name="PassWord" value="Parole"type="password" /> <input value="Ienakt" border="0" type="submit" /> </td> <input name="CookieDate" value="1" type="hidden" /> </table> </form> '; } if ($_COOKIE['member_id'] == true) { $cid = (int)$_COOKIE['member_id']; $mlc = mysql_real_escape_string($_COOKIE['pass_hash']); $sql = mysql_query("SELECT * FROM `ibf_members` WHERE `id` = '$cid' AND member_login_key='$mlc' LIMIT 1"); if(mysql_num_rows($sql)>0){ $row = mysql_fetch_object($sql); $idf = $row->id; $results = mysql_query("SELECT * FROM ibf_member_extra WHERE `id` = '".$idf."' "); $ros = mysql_fetch_object($results); $key = md5($row->email.'&'.$row->member_login_key.'&'.$row->joined); $points = $row->points; switch($ros->avatar_type){ case 'url': $avatars = $ros->avatar_location; break; case 'local': $avatars = "/img/no_avatar.gif"; break; case 'upload': $avatars = "f/uploads/".$ros->avatar_location; break; } echo' <center>Sveiks ,'.$row->members_display_name.' !</center> <br /> <center><img src="'.$avatars.'" alt="Avatar" title="'.$row->members_display_name.' Avatrs" /></center> <ul> <center><li><a href="#">Labot profilu</a></li> <li><a href="#">Jaunākie ieraksti</a></li> <li><a href="#">Vēstules <span style="color: red;" > ('.$row->new_msg.')</span></a></li> <li><a href="f/index.php?act=Login&CODE=03&k='.$key.'">Izlogoties</a></li> </center> </ul> '; }else{ login(); } }else{ login(); } ?> Quote Link to comment Share on other sites More sharing options...
daGrevis Posted March 17, 2012 Report Share Posted March 17, 2012 SELECT * FROM `ibf_members` WHERE `id` = '$cid' AND member_login_key='$mlc' LIMIT 1 ...feilo. Quote Link to comment Share on other sites More sharing options...
ayzyyy Posted March 17, 2012 Author Report Share Posted March 17, 2012 SELECT * FROM `ibf_members` WHERE `id` = '$cid' AND member_login_key='$mlc' LIMIT 1 ...feilo. Ko tad darit ? Quote Link to comment Share on other sites More sharing options...
daGrevis Posted March 17, 2012 Report Share Posted March 17, 2012 Salabot to. :-) Quote Link to comment Share on other sites More sharing options...
ayzyyy Posted March 17, 2012 Author Report Share Posted March 17, 2012 Palidzet nevari ? Es vel tikai macos Quote Link to comment Share on other sites More sharing options...
daGrevis Posted March 17, 2012 Report Share Posted March 17, 2012 Es nezinu kāda ir tavas datubāzes struktūra. Quote Link to comment Share on other sites More sharing options...
ayzyyy Posted March 17, 2012 Author Report Share Posted March 17, 2012 Ko tev tiesi vajag es pateiksu ! Quote Link to comment Share on other sites More sharing options...
daGrevis Posted March 17, 2012 Report Share Posted March 17, 2012 Man neko. ;D Nu paskaties pats vai tabulu un kolonu nosaukumi atbilst. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted March 17, 2012 Report Share Posted March 17, 2012 Vai vēl gudrāk būtu... tur kur izpildi kveriju: mysql_query('...'); Šitā: mysql_query('...') || mysql_error(); Tas dos detalizētāku kļudas aprakstu un tā. :) 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.