I will develop website using bootstrap, php, js and mysql. I have connect the db dynamically using php(hotel menu table). I have one side bar, in the center table menu, right side ordernow billing process. In this table i cant fetch all the row from the db line bulk of 244 rows(it just loading.......not display anything).(10 0r 20 finely working). I am using phpstorm 7.1.3(IDE) . I can use the below code:
<div class="col-md-8">
<?
$dbhost = '127.0.01';
$dbuser = 'root';
$dbpass = 'root';
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
if (!$conn)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db('hotpot');
$sql = 'SELECT * FROM Menu';
$retval = mysql_query( $sql);
$numrows = mysql_num_rows( $retval);
/*echo "<script type='text/javascript'>alert('$numrows')</script>";*/
echo $numrows;
echo "Fetched data successfully\n";
mysqli_close($conn);
?>
<input type="search" class="light-table-filter" data-table="order-table" placeholder="Filter">
<table id="table" class="order-table table">
<thead id="tablehead">
<tr>
<th>ID</th>
<th>CATEGORY</th>
<th>FOOD_TYPE</th>
<th>FOOD ITEM</th>
<th>PRICE</th>
<th>QUANTITY</th>
<th>CART</th>
</tr>
</thead>
<tbody>
<?php
ini_set('max_execution_time', 5); //300 seconds = 5 minutes----------->i can use this one but it will not work
if( mysql_num_rows( $retval )==0 ){
echo '<tr><td colspan="4">No Rows Returned</td></tr>';
}else{
while( $row = mysql_fetch_assoc( $retval)){
echo "<tr><td id='food_id'>{$row['ID']}</td>
<td id='category'>{$row['CATEGORY']}</td>
<td id='food_type'>{$row['FOOD_TYPE']}</td>
<td id='item'>{$row['ITEM']}</td>
<td id='price'>{$row['PRICE']}</td>
<td ><input id='uniqueIdentifier' type='number' name='input' value='1' max='50' min='1' class='order-count'></td>
<td><i class='fa fa-plus-circle' onmouseover='links=false;' onmouseout='links=true;' onclick='if(links)addB()'></i></td></tr>\n";
}
}
?>
</tbody>
</table>
</div>