ztimer Posted August 19, 2011 Share Posted August 19, 2011 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>"; Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 19, 2011 Share Posted August 19, 2011 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.