I'm having two tables (kabul_fotos and kabul_fotos_kat), both have a field "id". I need to call the id field of only one table (kabul_fotos) to edit the right data set.
--
I calling the mySQL database:
[...]PHP Code:$result = @mysql_query("SELECT * FROM kabul_fotos, kabul_fotos_kat WHERE kabul_fotos.kat_id=kabul_fotos_kat.id Order by datum");
And want to edit the right set:
--PHP Code:<?="<a href='edit.php?id=$id'>Edit</a>"?>
The problem is, that it shows me the ID of the wrong table (kabul_fotos_kat)...
Thus I tried to rename the ID field of one table like this:
But it seems like this is not the right way... "kabul_fotos.id AS foto_id" dosn't work.PHP Code:$result = @mysql_query("SELECT * kabul_fotos.id AS foto_id FROM kabul_fotos, kabul_fotos_kat WHERE kabul_fotos.kat_id=kabul_fotos_kat.id Order by datum");
![]()
Can someone help me - how do I do this?
Thanks
Flözen




Bookmarks