![]() |
Alexey admin 2/27/2009 |
Hi, |
![]() |
Sergey Kornilov admin 2/27/2009 |
I guess I know what's happening here. If you join two tables that related as Master-Details, i.e. one order and five details, primary key value will be the same for all five records. That's why imager always pull the first image. |
D
|
Denton author 3/3/2009 |
I guess I know what's happening here. If you join two tables that related as Master-Details, i.e. one order and five details, primary key value will be the same for all five records. That's why imager always pull the first image. To resolve this use second (joined) table as a main one and choose primary key from that table.
|
![]() |
Sergey Kornilov admin 3/3/2009 |
Denton, |
D
|
Denton author 3/13/2009 |
Denton, Demo Account won't help here. This is a database design issue. It works okay if you simply select data from the table. PHPRunner works the same way as SQLYog here. However to display image on the web page as a real image (as opposed to displaying binary data as text) you need yo use an additional PHP file (imager.php) that needs to know which record to pull. Since you use JOIN query primary fey value is the same for all five records. That's why you always see first record image. To fix this you either need to use suggested workaround (using joined table as a main one) or switch to file-based images.
|
![]() |
Sergey Kornilov admin 3/13/2009 |
Denton, |