<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("db_ldlp", $con);

$result = mysql_query("SELECT * FROM LB_table");

echo "<table border='8' color='white' >
<tr>
<th>Person Id</th>
<th>Name</th>
<th>Participant Status</th>
<th>Organiztion</th>
<th>Arrival Date</th>
<th>Departure Date</th>
<th>No Of Days</th>
<th>Room Status</th>
<th>Room Charge</th>
<th>Registeration</th>
<th>Total Expense </th>


</tr>";

while($row = mysql_fetch_array($result))
{

echo "<tr>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";
echo "<td>" . $row . "</td>";

echo "</tr>";

}


echo "</table>";

mysql_close($con);
?></br></br></br>

<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("db_ldlp", $con);

$result = mysql_query("SELECT SUM(TotalAmount) FROM LB_table");

echo "<table border='8'>
<right><tr>

<th>Total Expense value </th>


</tr>";

while($row = mysql_fetch_array($result))
{

echo "<tr>";

echo "<td>" . $row . "</td>";

echo "</tr>";

}


echo "</table>";

mysql_close($con);

Recommended Answers

All 2 Replies

What the question is all about ?

Is it database related ?

Yea I think it is Data base related . like this

PersonId Name

1(WIN1) M.jmckumar

2(WIN2) S.samuvel raj

3(WIN3) N.Jacob

I want method like this Is it possible and another one if I deleted one primery key

field details can I get perimery number queue proberly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.