Note that there are some explanatory texts on larger screens.

plurals
  1. PODynamic table format
    text
    copied!<p>i have this table to display data from my database dynamically</p> <pre><code>&lt;table border="1"&gt; &lt;th&gt;PO&lt;/th&gt; &lt;th&gt;Fuel Details ID&lt;/th&gt; &lt;th&gt;Date&lt;/th&gt; &lt;th&gt;Price&lt;/th&gt; &lt;th&gt;Liters&lt;/th&gt; &lt;th&gt;Previous Balance&lt;/th&gt; &lt;th&gt;Hobo&lt;/th&gt; &lt;th&gt;Truck ID&lt;/th&gt; &lt;th&gt;Fuel Source&lt;/th&gt; &lt;th&gt;Date&lt;/th&gt; &lt;th&gt;Route&lt;/th&gt; &lt;th&gt;Destination&lt;/th&gt; &lt;th&gt;Number of Vans&lt;/th&gt; &lt;th&gt;Stripping&lt;/th&gt; &lt;th&gt;Truck ID&lt;/th&gt; &lt;th&gt;Customer ID&lt;/th&gt; &lt;th&gt;Driver ID&lt;/th&gt; &lt;th&gt;PO ID&lt;/th&gt; &lt;th&gt;Waybill ID&lt;/th&gt; &lt;?php do { ?&gt; &lt;tr&gt; &lt;td&gt;&lt;?php echo $row_PKFD['tbl_po_id_po']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKFD['id_fuel_details']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKFD['fuel_details_date']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKFD['fuel_details_price']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKFD['fuel_details_liters']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKFD['fuel_details_previous_bal']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKFD['fuel_details_hobo']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKFD['tbl_truck_id_truck']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKFD['tbl_fuel_source_id_fuel_source']; ?&gt;&lt;/td&gt; &lt;?php do { ?&gt; &lt;td&gt;&lt;?php echo $row_PKDD['delivery_details_date']?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKDD['delivery_details_route']?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKDD['delivery_details_destination']?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKDD['delivery_details_van_no']?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKDD['delivery_details_strip_stuff']?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKDD['tbl_truck_id_truck']?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKDD['tbl_customer_id_customer']?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKDD['tbl_driver_id_driver']?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKDD['tbl_po_id_po']?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row_PKDD['tbl_waybill_id_waybill']?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } while ($row_PKDD = mysql_fetch_assoc($PKDD)); ?&gt; &lt;?php } while ($row_PKFD = mysql_fetch_assoc($PKFD)); ?&gt; &lt;/table&gt; </code></pre> <p>the first displays the first instance if the program finds two or more data related to the first it will make another which is in the below code as you can see my problem is when i display the first and the first instance of the second are aligned but when the program finds another data related to the first it will make another but not inline on the second i want it to show that the first will be aligned with the first instance of the second and the second instance of the second will be below the first instance of the second </p> <p><img src="https://i.stack.imgur.com/qHVzN.png" alt="What is being displayed"></p> <p><img src="https://i.stack.imgur.com/8gFNZ.png" alt="What i want displayed"></p> <p>The first picture shows what is displayed by the code</p> <p>the second picture shows what i want to display</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload