Jump to content

Table row return with multiple results.


ztimer

Recommended Posts

Hi i was wondering what am i doing wrong. I have made a loop query and with the results i get a table. row by date. Now one column i need to get the info of what workers are at work

that day so i need to make a query at that row. Looping again. But i cant get the placement right.

 

print "<td><div title='<b>".strftime("%e.%m.%y <B>%a</B>", strtotime("$row[date]"))."</b><br>$user_numina Anna Cristi Karita Aruksaar: 09:00:00 - 21:00:00<br>Kuki Muki: 09:00:00 - 21:00:00'>$durationsum ($amount_of_workers)</div></td>";

 

I would like to place in title a code

while ($i < $num) {print $user_id=mysql_result($result,$i,"user_id");$i++;}

 

How can i do it??

print "<td><div title='<b>".strftime("%e.%m.%y <B>%a</B>", strtotime("$row[date]"))."</b><br>".while ($i < $num) {print $user_id=mysql_result($result,$i,"user_id");$i++;}."'>$durationsum ($amount_of_workers)</div></td>";

 

Link to comment
https://forums.phpfreaks.com/topic/245233-table-row-return-with-multiple-results/
Share on other sites

You should not run queries in loops. You should be able to get all the data you need with a single query. Provide some details of the tables you are pulling data from, what data you want, and the format you want the data to be displayed.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.