A
Anonymous
Guest
Hey all,
Been a abit since I have been back, hope everyone is well.
I have a small problem with a query that you would think would return a simple result:
The query echos back correctly with $eID as 28 now. The results are returned. Hoever, it skips on entry ... for example:
Table: vexpenses
fields: vID, veID, vName, vDesc, vAmount, vSite
vID is the Primary Key
veID is the link to the expenses table where the report generals are stored. veID = eID from the expenses table.
Table: expenses
fields: eID, eCategory, eName, eDetails
eID is the primary key.
eID matches with veID to pull up specific vendors that are linked to this category expense.
Anyonr have a similar problem with the first record seemingly being skipped?
Been a abit since I have been back, hope everyone is well.
I have a small problem with a query that you would think would return a simple result:
Code:
// user clicks a link to export the data they see into a csv (in this case we are only going to display the data back to the screen... they click the link and assign a variable number in this case (28) to the $eID variable.
$eID='28';
$nquery = "SELECT * FROM expenses LEFT JOIN vexpenses ON vexpenses.veID='$eID'";
echo $nquery;
$nresult=mysql_query($nquery);
while ($nrow = mysql_fetch_array($nresult))
{
echo $nrow['eID'].",".$nrow['vID'].",".$nrow['eCategory'].",".$nrow['vName']."<br>";
}
The query echos back correctly with $eID as 28 now. The results are returned. Hoever, it skips on entry ... for example:
Table: vexpenses
fields: vID, veID, vName, vDesc, vAmount, vSite
vID is the Primary Key
veID is the link to the expenses table where the report generals are stored. veID = eID from the expenses table.
Table: expenses
fields: eID, eCategory, eName, eDetails
eID is the primary key.
eID matches with veID to pull up specific vendors that are linked to this category expense.
Anyonr have a similar problem with the first record seemingly being skipped?