I am used to this:
$query = "select * from table1";
$lookresult = mysql_query($query);
if(mysql_num_rows($lookresult) > 0) {
while($myrow=mysql_fetch_array($lookresult)){
$no=$myrow["no"];
?> html codes <?
echo $no;
?> html codes <?
}
}
Is there a way to query two or more tables in 1 while statement..
i.e.
$query1 = "select * from table1";
$lookresult1 = mysql_query($query1);
$query2 = "select * from table2";
$lookresult2 = mysql_query($query2);
if(????????????????) > 0) {
while(??????????????????)){
echo qry result 1
echo qry result 2
}
}
is this possible? i am a newbie.. and i am probly talking based on my ignorance.. guys would rly love to get some input on this.. or on howto posbly do this...
$query = "select * from table1";
$lookresult = mysql_query($query);
if(mysql_num_rows($lookresult) > 0) {
while($myrow=mysql_fetch_array($lookresult)){
$no=$myrow["no"];
?> html codes <?
echo $no;
?> html codes <?
}
}
Is there a way to query two or more tables in 1 while statement..
i.e.
$query1 = "select * from table1";
$lookresult1 = mysql_query($query1);
$query2 = "select * from table2";
$lookresult2 = mysql_query($query2);
if(????????????????) > 0) {
while(??????????????????)){
echo qry result 1
echo qry result 2
}
}
is this possible? i am a newbie.. and i am probly talking based on my ignorance.. guys would rly love to get some input on this.. or on howto posbly do this...