Hello again!
Wonderful tool and so capable yet I hit a snag again. I am trying to query each row in my forms table to return results matched off the logged in userID.
Here is the code body ...
This returns the results for every item, EXCEPT the one fieldset it should. Basically if User is logged in as admin and id is 64, and sale is recorded for 64 it should display that users fields.
On a sidenote I have 110 fields in each row, should I be using some sort of array or is my data structure going to hinder me later?
-J
Wonderful tool and so capable yet I hit a snag again. I am trying to query each row in my forms table to return results matched off the logged in userID.
Here is the code body ...
<table style="text-align: left; width: 100%;" border="0"
cellpadding="2" cellspacing="0">
<tbody>
<tr <?php if ($i % 2) echo ' style="background-color: #aaa;"';?> >
<td style="font-weight: bold; width: 3%;">
<?php if($MyRow->l1_user_id == $user->id){ ?>{l1_quantity} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l1_user_id == $user->id){ ?>{salesperson} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l1_user_id == $user->id){ ?>{l1_description} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l1_user_id == $user->id){ ?>{l1_special} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l1_user_id == $user->id){ ?>{l1_price} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l1_user_id == $user->id){ ?>{l1_total} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l1_user_id == $user->id){ ?>{date} <?php } ?>
</td>
<td style="font-weight: bold; width: 10%;">
<?php if($MyRow->l1_user_id == $user->id){ ?>{invoice_method} <?php } ?>
</td>
</tr>
</tbody>
<tbody>
<tr <?php if ($i % 2) echo ' style="background-color: #aaa;"';?> >
<td style="font-weight: bold; width: 3%;">
<?php if($MyRow->l2_user_id == $user->id){ ?>{l2_quantity} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l2_user_id == $user->id){ ?>{salesperson} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l2_user_id == $user->id){ ?>{l2_description} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l2_user_id == $user->id){ ?>{l2_special} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l2_user_id == $user->id){ ?>{l2_price} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l2_user_id == $user->id){ ?>{l2_total} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l2_user_id == $user->id){ ?>{date} <?php } ?>
</td>
<td style="font-weight: bold; width: 10%;">
<?php if($MyRow->l2_user_id == $user->id){ ?>{invoice_method} <?php } ?>
</td>
</tr>
</tbody>
<tbody>
<tr <?php if ($i % 2) echo ' style="background-color: #aaa;"';?> >
<td style="font-weight: bold; width: 3%;">
<?php if($MyRow->l3_user_id == $user->id){ ?>{l3_quantity} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l3_user_id == $user->id){ ?>{salesperson} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l3_user_id == $user->id){ ?>{l3_description} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l3_user_id == $user->id){ ?>{l3_special} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l3_user_id == $user->id){ ?>{l3_price} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l3_user_id == $user->id){ ?>{l3_total} <?php } ?>
</td>
<td style="font-weight: bold; width: 15%;">
<?php if($MyRow->l3_user_id == $user->id){ ?>{date} <?php } ?>
</td>
<td style="font-weight: bold; width: 10%;">
<?php if($MyRow->l3_user_id == $user->id){ ?>{invoice_method} <?php } ?>
</td>
</tr>
</tbody>
</table>
<?php $i++ ?>
<br>
This returns the results for every item, EXCEPT the one fieldset it should. Basically if User is logged in as admin and id is 64, and sale is recorded for 64 it should display that users fields.
On a sidenote I have 110 fields in each row, should I be using some sort of array or is my data structure going to hinder me later?
-J