Table with child rows from mysql table

Job ID: 31904117

Budget: $10 – $30 USD

I have a Mysql table, from which, using plugin called DataTables, I create a table on my Wordpress website. So basically I fetch a table with 10 columns and 300-400 rows. I want to understand how to fetch two more columns from SQL, let's say "price" and "salary", and insert those into child rows. I have seen some examples on the website but they seem either too complex for me or not suitable for SQL data. My current table is not using AJAX nor JSON to fetch data, I just make a query to sql, fetch results and input them into a table using something like "while ($queryRow = $queryResult->fetch_row()) {
echo "<tr>";
for($i = 0; $i < $queryResult->field_count; $i++){
echo "<td>$queryRow[$i]</td>";"

Reference for what I want to see: https://datatables.net/examples/api/row_details.html

If it's not possible to do child rows using my current table's format, it's okay to change it if you explain me how to use it. Please consider that I'm using Wordpress and my webdev skills are not impressive. Thank you in advance!
Related categories: PHP JavaScript WordPress MySQL Datatables