Date: 02/17/00
- Next message: Bryan McGuire: "Re: [PHPLIB] Minor Bug: setting user variable in url causes error"
- Previous message: Rahul Jain: "[PHPLIB] Opening window"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
this time i try to make db query where in the result another db query should be
made.
<?php
/* open db connection */
$db = new mm4;
/* start first query */
$db->query("select user_id, start, end, views from mm4_fx");
$db->np();
while ($db->Next_Record()) {
print "<p> 1. query: ".$db->f("user_id")." ".$db->f("start")."
".$db->f("end")." ".$db->f("views")."</p>";
$user_id = $db->f("user_id");
/* start second query */
$db->query("select skills from user_data where user_id = $user_id");
$db->np();
while ($db->Next_Record()) {
print "<p> 2. query: ".$db->f("skills")."</p>";
}
/* end second query */
}
/* end first query */
?>
the output is not quite what i want:
3
1. query: 415 2000-01-16 2000-02-16 0
1
2. query: 101|104|105|106|107|108|111|112
the two queries are just an example of what i want to do - in case of the
queries i have used in my example i could have done it with only one query.
according to the result in the first query i need to run and output a second
query.
there is probably some misunderstanding of what phplib can and can't do.
hopefully someone can point me to the right direction or show me a workaround.
cheers,
andreas
-- Andreas OttoNoHo Digital Ltd, Floor 2, Canberra House, 315 -317 Regent Street London W1R 7YB
Reception 0171 299 3434 Fax 0171 631 5050 http://www.noho.co.uk
- PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>. To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in the body, not the subject, of your message.
- Next message: Bryan McGuire: "Re: [PHPLIB] Minor Bug: setting user variable in url causes error"
- Previous message: Rahul Jain: "[PHPLIB] Opening window"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

