|
-
Jan 12th, 2013, 07:41 PM
#1
Thread Starter
Lively Member
[RESOLVED] dataset within dataset/list within a list
I'm trying to display a list of data within a larger list, as a rough example:
First List Row 1 --->Second List A
--->Second List B
--->Second List C
First List Row 2 --->Second List A
First List Row 3 --->Second List B
--->Second List C
...and so on...
I've tried to simplify my code, so it only includes two fields, but the result is the same, it only shows 1 result:
(i.e. First List Row 1 --->Second List A
--->Second List B
--->Second List C)
Here is the code:
<html>
<head>
<title>View Issues</title>
</head>
<body marginheight="0" topmargin="0" marginwidth="0"
leftmargin="0" style="margin:0;padding:0" bgcolor="#B0E0E6">
<form action="add_issue3.php" method="post">
<?php
include_once('functions.php');
$db = new mysqli('HOSTNAME', 'USER', 'PASSWORD', 'DATABASE');
$query = "call sp_filter_issues_description(1,'BACR%')";
$result = $db->query($query);
$num_results = $result->num_rows;
while($row = $result->fetch_assoc())
{
?>
<table border="1" style="border:solid black" cellpadding="0"
cellspacing="0" width="100%">
<tr>
<td>
<?php echo $row['currency_ticker'];?>
</td>
<td>
<table width='100%'>
<?php
$db1 = new mysqli('HOSTNAME', 'USER', 'PASSWORD', 'DATABASE');
$query1 = "call sp_bookrunner(100)";
$result = $db1->query($query1);
$num_results = $result->num_rows;
while($row = $result->fetch_assoc())
{
echo "<tr><td>".$row['bond_ticker']."</td></tr>";
}
$db1->close;
?>
</table>
</td>
</tr>
</table>
<?php }
$db->close();
?>
</form>
</body>
</html>
(Just while testing, I hardcoded the row id, so the 100 you see going into the stored procedure would be a variable in reality, I just wanted to check the code worked first, before assigning a variable).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|