Jump to content

Recommended Posts

Posted

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 .

  • Administrator
Posted

Daca faci asta trebuie sa rescrii o parte din sistemul tau, eu ti-am dat sa vezi parametrii pentru acea functie.

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.