Condicional if si un valor es igual o mayor a 2 mostrar

Condicional if si un valor es igual o mayor a 2 mostrar

if ($numrows>0)       este es la que uso 

Quiero validar un dato que sea mayor a 2 de un campo en un código php

Estoy usando una condicional en la linea 36 y lo que busco es que solo me muestre los datos aparir del numero 2 en adelante de un campo autonómico

¿

<?php
/* Connect To Database*/
require_once ("../conexion.php");

$action = (isset($_REQUEST['action'])&& $_REQUEST['action'] !=NULL)?$_REQUEST['action']:'';
if($action == 'ajax'){
$query = mysqli_real_escape_string($con,(strip_tags($_REQUEST['query'], ENT_QUOTES)));

$tables="padrondatadex";
$campos="*";
$sWhere=" padrondatadex.prod_name LIKE '%".$query."%'";
$sWhere.=" order by padrondatadex.id";
include 'pagination.php'; //include pagination file
//pagination variables
$page = (isset($_REQUEST['page']) && !empty($_REQUEST['page']))?$_REQUEST['page']:1;
$per_page = 1; //how much records you want to show
$adjacents = 4; //gap between pages after number of adjacents
$offset = ($page - 1) * $per_page;
//Count the total number of row in your table*/
$count_query = mysqli_query($con,"SELECT count(*) AS numrows FROM $tables where $sWhere ");
if ($row= mysqli_fetch_array($count_query)){$numrows = $row['numrows'];}
else {echo mysqli_error($con);}
//$total_pages = ceil($numrows/$per_page);
//main query to fetch the data
$query = mysqli_query($con,"SELECT $campos FROM $tables where $sWhere LIMIT $offset,$per_page");
//loop through fetched data

if ($numrows>0){
?>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th >VOTANTE</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
$finales=1;
while($row = mysqli_fetch_array($query)){
$product_id=$row['id'];
$prod_code=$row['prod_code'];
$prod_ctry=$row['prod_ctry'];
$finales++;
?>
<tr class="<?php echo $text_class;?>">
</tr> <th><td ><?php echo $prod_code;?></td></tr>
</tr> <th><td ><?php echo $prod_ctry;?></td></tr>
<td>
<td>
<a href="#" data-target="#editProductModal" class="edit" data-toggle="modal" data-code='<?php echo $prod_code;?>' data-name="<?php echo $prod_name?>" data-category="<?php echo $prod_ctry?>" data-stock="<?php echo $prod_qty?>" data-price="<?php echo $price;?>" data-id="<?php echo $product_id; ?>"><i class="btn btn-info" data-toggle="tooltip" title="Registrar" ><input type="submit" class="btn btn-info" value="Registrar">
</td>
</tr>
<?php }?>
<tr>
<td colspan='6'>
<input type="button" class="btn btn-default" value="Cerrar Sesion" onClick=" window.location.href='../logout.php' ">
</td>
</tr>
</tbody>
</table>
</div>

¿

<?php
}
}
?>

Añade tu respuesta

Haz clic para o