473,513 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get <td> value from different resultset in one table ?

3 New Member
Expand|Select|Wrap|Line Numbers
  1.     $outresult=mysql_query($outquery) or mysql_error();
  2.             while ($inrow = mysql_fetch_array($inresult)) {
  3.                 ?>
  4.                 <tr align="center">
  5.                      <td> <?php echo $inrow['emp_name'];?></td>
  6.                      <td><?php echo $inrow['entrance_date'];?></td>
  7.                      <td><?php echo $inrow['entrance_time'];?></td>
  8.                     <?php 
  9.                     while ($outrow = mysql_fetch_array($outresult)) 
  10.                     { ?>
  11.                      <td><?php echo $outrow['entrance_time']; ?> </td>
  12.                     <?php     
  13.                     }  ?>
  14.                  </tr>                 
  15.             <?php    
  16.             }
  17.  
i attach my view i want that 2nd td in 2nd row
Attached Images
File Type: jpg error.jpg (12.7 KB, 183 views)
Aug 29 '12 #1
2 2230
Exequiel
288 Contributor
Expand|Select|Wrap|Line Numbers
  1.  $outresult=mysql_query($outquery) or mysql_error();
  2.             while ($inrow = mysql_fetch_array($inresult)) {
  3.                 ?>
  4.                 <tr align="center">
  5.                  <?php 
  6.                     while ($outrow = mysql_fetch_array($outresult)) 
  7.                     { ?>
  8.                      <td> <?php echo $inrow['emp_name'];?></td>
  9.                      <td><?php echo $inrow['entrance_date'];?></td>
  10.                      <td><?php echo $inrow['entrance_time'];?></td>
  11.  
  12.                      <td><?php echo $outrow['entrance_time']; ?> </td>
  13.                     <?php     
  14.                     }  ?>
  15.                  </tr>                 
  16.             <?php    
  17.             }
Aug 29 '12 #2
Rabbit
12,516 Recognized Expert Moderator MVP
Exequiel, that's incorrect as well.

vaishaki, if you're sure that the order and number of records is the same in both recordsets, you can increment the out recordset at the same time as the in without using the while loop.
Aug 29 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3864
by: Sturnoff Megantic | last post by:
This seems like such a stupid little problem, but it's been bugging me for hours now. I have a 2D array called agents2d. I need to loop through it and display the info. Here is my code: echo...
1
2825
by: Filiz Duman | last post by:
Hi, I am opening a pop up window (child) from a parent window. The Child window does show a table with multiple columns and rows, each showing a value, e.g. 9 or 10 or etc. I have the values as...
3
4812
by: Gil | last post by:
Hello, I use VB.NET and have a series of linkbuttons that are inside individual <td>s. Like this: <td background="image.gif"><asp:linkbutton id="myID" runat="server"/></td> I would like...
2
11191
by: js | last post by:
I have a table rendered with XSLT. The first column has a radio button controls for user to make a selection for a particular row. All the values in the remaining columns are all concated with a...
3
1691
by: RC | last post by:
I have a very sime html table like <html><head><title>My Table</title> <style> input { margin: 0; padding: 0; border-width: 0; text-indet: 0; text-align: left } </style></head><body> <table...
5
2927
by: mahesr | last post by:
I want to match some particular text between <tr>and </tr> or <td>and </td>.... in PHP. like below............ <table><tr> CATEGORY: <td><font face="Verdana" size="1" color="#A000A0"> Wedding...
1
30747
nirmalsingh
by: nirmalsingh | last post by:
i want to hide a td value to the users. how to make hide the values in <td> of html table? i have tried width=0px, width="0%". but it doesnt works.
4
2350
by: John | last post by:
I am attempting to make a table data row editable once clicked on but I am not sure how to show the <tdwith two different states. I've got it to the point where the <tdis hidden then appears within...
4
5267
by: harryusa | last post by:
I am trying to center 2 images concentrically which are z-indexed to lay on top of each other making an image with a border from another image that has a transparent center. I need the images to be...
4
3595
by: ismailc | last post by:
Good day, RamananKalirajan helped me with a great script to do a popup div. The problem i now have is that the popup div within the div does not like any table><tr><td>, so itried using <div> in...
0
7264
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7166
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7543
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7106
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7534
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5689
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5094
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3236
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.