2006-11-11 01:09:08 +03:00
|
|
|
|
2007-04-13 00:52:30 +04:00
|
|
|
|
|
|
|
<code type="php">
|
|
|
|
|
|
|
|
// retrieve the first 20 users and all their associated phonenumbers
|
|
|
|
|
|
|
|
$users = $conn->query("SELECT u.*, p.* FROM User u, u.Phonenumber p LIMIT 20");
|
|
|
|
|
|
|
|
foreach($users as $user) {
|
|
|
|
print ' --- '.$user->name.' --- \n';
|
|
|
|
|
|
|
|
foreach($user->Phonenumber as $p) {
|
|
|
|
print $p->phonenumber.'\n';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</code>
|