I have used inner join before to select data from a database across tables but how can it be used in this example as I am doing two server calls which is slowing down the server response and hopefully inner join will remove this issue on a large database.
First Call - SELECT * FROM db1
Second Call - SELECT name FROM db2 WHERE db1.x = db2.y
Can you explain a bit more about the while clause in your code, and what is that you want to achieve?
The while loop is just the loop through the original table result rows.
And then within the loop is the second call to get the name from the reference number.
I am trying to achieve a faster database call time as the current ‘double call’ takes around 10 seconds to complete due the vast number of table rows in the first instance.
INNER JOIN db1
ON db1.x = db2.y
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.