I know this is probably due to the fact that I've been looking at this for over 12 hours to resolve this issue. I am using a mysql database and php to generate an extraction/calculation code for keeping my reports stable.
I am trying to create a query/calculation that will result in displaying on seperate invoice teplates, most likely via echo. I haven't added the mysql joins yet for multipe table and/or row extraction yet. I do know how to do that. The problem is in the calculation being correct first.
Here is what I have so far, as I am running the test but haven't broken the product-id down into individual representations yet:
$query = "SELECT * FROM $tablename WHERE name = '$vendor_id'";
$result = mysql_query($query);
$num = mysql_num_rows($result);
$i = 0;
IF ($num == 0) :
PRINT "No data";
ELSEIF ($num > 0) :
PRINT "Data that matched your query: $num<BR>";
WHILE ($i < $num) :
$vendor_id = mysql_result($result,$i,"vendor");
$product_id = mysql_result($result,$i,"product");
PRINT "The products of $vendor_id is: $product_id.<BR>";
$i++;
ENDWHILE;
ENDIF;
Thanks in advance to anyone that can help me out here.
Aftershock2020