Jump to content

logs bug


official

Recommended Posts

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 44
Liniile 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/KZm7ejK
Ati incercat sa rezolvati singur?: Da, dar nu reusesc .

Link to comment
Share on other sites

<?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. 

qua8n0lrq5wl5v5xccbk.png
 
mf79y6bvavi9sp2qqfoi.png
Contact: Mail: [email protected]
Y!M: r3mus.onlypro
Skype: r3mus.onlypro
Link to comment
Share on other sites

<?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...

qua8n0lrq5wl5v5xccbk.png
 
mf79y6bvavi9sp2qqfoi.png
Contact: Mail: [email protected]
Y!M: r3mus.onlypro
Skype: r3mus.onlypro
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.