How to insert data into multiple table in mySQL
How to insert data into multiple table in mySQL?
i just know this one:
Code:
$sql="insert into daily_quest(content,date,answer) values('$content','$date','$answer')";
and is there any configuration for the primary or foreign key in mysql database design?
thx for your attention....
how to select from multiple table?
ok it done know and it work perfectly in the database.
here's the new problem.
How to call or select from multiple table?
here is my code to call or select data from single table:
Code:
<?php
include "connect.php";
$sql ="select * from user";
$rs = mysql_query($sql);
while(
$fetch= mysql_fetch_array($rs)){
?>
<tr class="fontContent">
<td> <?=$fetch[1] ?> </td>
<td> <?=$fetch[2] ?></td>
<td> <?=$fetch[4] ?></td>
<td class="news fontNewsBlue"><a href="edituser.php?kode=<?=$fetch[0]?>">Edit</a><strong> |</strong> <a href="deleteuser.php?kode=<?=$fetch[0]?>">Delete</a> </td>
</tr>
<?php
}
include "disconnect.php";
?>
How to select data from multiple table?
thx...