I know how to display one or two or three on php using where function, but what if there is 100 records?
This is the example
(user enter his first name)(father name) and (grandfather name)
(all in one table)
I want to display some data using where function
such as
show from (table name) where father name="Monkey") *this is understood
but then what?
how to display all the sons of Monkey (say they are 100/)
here where i'm (code)
<?php
$con = mysql_connect("localhost","XXX","XXX");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("XXX_test", $con);
$result = mysql_query("SELECT * FROM family where fname='AAA");
while($row = mysql_fetch_array($result))
{
echo $row['name'];
}
mysql_close($con);
?>
thank you in advance
This is the example
(user enter his first name)(father name) and (grandfather name)
(all in one table)
I want to display some data using where function
such as
show from (table name) where father name="Monkey") *this is understood
but then what?
how to display all the sons of Monkey (say they are 100/)
here where i'm (code)
<?php
$con = mysql_connect("localhost","XXX","XXX");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("XXX_test", $con);
$result = mysql_query("SELECT * FROM family where fname='AAA");
while($row = mysql_fetch_array($result))
{
echo $row['name'];
}
mysql_close($con);
?>
thank you in advance