Problem with two recordset
2 Message(s) by 2 Author(s) originally posted in php language
| From: nervino |
Date: Tuesday, September 25, 2007
|
I am trying to print "selected" when an id of the first recordset is
also present in the second recordset.
I did the
code below but it only print out "selected" one time, and I'm
shure there are two id in the second recordset identical to two id of
the first.
What do I mistake?
(I hope my english to be understandable)
Thank youMy code:
$query_cat = "SELECT * FROM cat_documenti ORDER BY categoria ASC";
$result_query_cat=mysql_query($query_cat)
or die('Query failed. ' . mysql_error());
$query_cat_sel = "SELECT id_categoria_doc FROM link_cat_doc WHERE
id_documento =".$id_documento;
$result_query_cat_sel=mysql_query($query_cat_sel)
or die('Query failed. ' . mysql_error());
$dati_recordset = mysql_fetch_array($result_query_news);
$dati_recordset_cat_sel = mysql_fetch_array($result_query_cat_sel);
while ($dati_recordset_cat = mysql_fetch_array($result_query_cat)) {
$id_categoria_doc=$dati_recordset_cat['id_categoria_doc'];
$categoria=$dati_recordset_cat['categoria']; while ($dati_recordset_cat_sel = mysql_fetch_row($result_query_cat_sel)) {
$id = $dati_recordset_cat_sel["id_categoria_doc"];
if (in_array($id_categoria_doc, $dati_recordset_cat_sel)) {
echo " selected=\"selected\"";
}
}
print $categoria;
}
| From: C. |
Date: Tuesday, September 25, 2007
|
wrote in message:
I am trying to print "selected" when an id of the first recordset is
also present in the second recordset.
I did the code below but it only print out "selected" one time, and I'm
shure there are two id in the second recordset identical to two id of
the first.
What do I mistake?
(I hope my english to be understandable)
Thank you
My code:
$query_cat = "SELECT * FROM cat_documenti ORDER BY categoria ASC";
$result_query_cat=mysql_query($query_cat)
or die('Query failed. ' . mysql_error());
$query_cat_sel = "SELECT id_categoria_doc FROM link_cat_doc WHERE
id_documento =".$id_documento;
$result_query_cat_sel=mysql_query($query_cat_sel)
or die('Query failed. ' . mysql_error());
$dati_recordset = mysql_fetch_array($result_query_news);
$dati_recordset_cat_sel = mysql_fetch_array($result_query_cat_sel);
while ($dati_recordset_cat = mysql_fetch_array($result_query_cat)) {
$id_categoria_doc=$dati_recordset_cat['id_categoria_doc'];
$categoria=$dati_recordset_cat['categoria'];
while ($dati_recordset_cat_sel = mysql_fetch_row($result_query_cat_sel)) {
$id = $dati_recordset_cat_sel["id_categoria_doc"];
if (in_array($id_categoria_doc, $dati_recordset_cat_sel)) {
echo " selected=\"selected\"";
}
}
print $categoria;
}
FFS use a
join in one recordset!
C.
Next Message: How I can extract a text from image(jpeg, tiff,etc..) ?
Blogs related to Problem with two recordset
Generator
... auburn, new hampshire aksa generator csharp+dal+generator to045 generator tod pip tone generator generator
cordsets pentor saltwater generators power back generator 5250 watts tig welder generator rv generator mufflers harness
...
Click here to get all the information you need
Cocheco river tours ludwig close up
two pleasant ridge cheddar cheese, ca 94385671577
problems with paypal molly malones, illinois hogan son. aimee jo taylor movie called balls of fury monk usa nba online game grassroots andrew shapiro
...
Generator
... wind generator portable thermoelectric generator industrial standby generators edmonton filmandtv generator hire commerical standby generator wind generators moters geherator starter-generator generator
cordset - 125/250v, 30 amp,
...
Everywhere you look these days there is information.
971 4 333 07 72 curriculum mapping windows xp boot
problem duracil snow guards grabyourguitar.com high level of proinsulin and goldsworthy tattoos - indigenous people. chanson ;donne un mot de la meme famille que;chanson grandmother
...
This website will help you to find out everything you need to know ...
first pregnancy at age 45
two messiahs myringoplasty kan du lese alles lena beskrivelse chart house restaurant free software downloads 92 3025 423 561 florida lions sight dogs gallstones wrestling jimmy coffield 27 84 88 40 00 8 descent
...
Agape(selfless love) m-lsv
Any god who took a lesser partner would be imprisoned and their love would be executed as well as any impure child the
two of them conceived. The
problem was Pritam had fallen deeply in love with a Tutela(angel) named Caer(f).
...