official Posted February 13, 2015 Posted February 13, 2015 Problema intalnita (descriere): Cand intru pe panel la logs imi da aceasta eroare "Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:xampphtdocslogs.php on line 44"Ero(area / rile) / warning-(ul / urile): Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:xampphtdocslogs.php on line 44Liniile de cod / sursa / script-ul(obligatoriu): <?php include 'includes/config.php'; include 'includes/header.php'; $tmp = array(); foreach($member_types as $id => $member){ if($id > 0){ $tmp[] = '<a class="active" href="logs.php?f='.$id.'">'.$member.'</a>'; } } ?> <div class="main-content"> <div class="page-content"> <div class="row-fluid"> <div class="span12"> <div class="tabbable tabs-right"> <ul class="nav nav-tabs" id="myTab4"> <li> <a style="display:none;" data-toggle="tab" href="#home4"><?php echo implode($tmp); ?></a> </li> </ul> <?php $f = isset($_GET['f']) ? $_GET['f'] : 1; if($f==0)$f=1; else if($f > 17)$f=1; else if($f < 0)$f=1; ?> <div class="tab-content"> <h4><?php echo $member_types[$f]; ?></h4> <table class="table info"> <?php $query = mysql_query("SELECT * FROM flogs WHERE faction ='$f' order by id desc"); while($row = mysql_fetch_array($query)): ?> <tr> <td><?=$row['time']?></td> <td><?=$row['text']?></td> </tr> <?php endwhile; ?> </table> </div> </div> </div> </div> </div> </div> Imagini / Video (optional): http://imgur.com/KZm7ejKAti incercat sa rezolvati singur?: Da, dar nu reusesc .
Administrator WopsS Posted February 13, 2015 Administrator Posted February 13, 2015 http://php.net/manual/ro/function.mysql-fetch-array.php
official Posted February 13, 2015 Author Posted February 13, 2015 Woops sa inteleg ca in loc fetch array sa folosesc PDOStatement::fetch()?
Administrator WopsS Posted February 13, 2015 Administrator Posted February 13, 2015 Daca faci asta trebuie sa rescrii o parte din sistemul tau, eu ti-am dat sa vezi parametrii pentru acea functie.
official Posted February 13, 2015 Author Posted February 13, 2015 Mda nu inteleg... e scris bine scriptul... habar nu am dc nu vrea sa mearga
R3muSGFX Posted February 14, 2015 Posted February 14, 2015 <?php $query = mysql_query("SELECT * FROM flogs WHERE faction ='$f' order by id desc"); $row = mysql_fetch_array($query) while($row): ?> <tr> <td><?=$row['time']?></td> <td><?=$row['text']?></td> </tr> <?php endwhile; ?> Vezi așa dacă vrea. Contact: Mail: [email protected]Y!M: r3mus.onlyproSkype: r3mus.onlypro
official Posted February 14, 2015 Author Posted February 14, 2015 Acm imi da asa http://imgur.com/hgjXjMK..........
R3muSGFX Posted February 14, 2015 Posted February 14, 2015 <?php $query = mysql_query("SELECT * FROM flogs WHERE faction ='$f' order by id desc"); $row = mysql_fetch_array($query) while($row) { ?> <tr> <td><?=$row['time']?></td> <td><?=$row['text']?></td> </tr> <?php } ?> Daca nici acum nu functioneaza revino la forma pe care ai postat-o aici... Contact: Mail: [email protected]Y!M: r3mus.onlyproSkype: r3mus.onlypro
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now