Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.