par
Calimero » 18 mai 2010, 22:48
Hello Andrej,
What do you need in order to do that ? Pure SQL or PHP code ? And what RDBMS are you using ?
In theory, the difficult part is getting this recordset from the database, that can be done quite easily with a simple joined query between the two tables through the COMPANY_ID common field (Primary key on the first table, Foreign key on the other one).
Something like that should do it :
SELECT *
FROM COMPANY, AGENDA
WHERE COMPANY.COMPANY_ID = AGENDA.COMPANY_ID
The php part is pretty straightforward really, and you can find good examples of it on any decent PHP resource available on the web, including the must-read php manual :
http://php.net/mysql_query . (We could link you to several good resources to learn from though, but they'd all be written in french !).
Hope this helps. Please consider
learning french if you intend to post on this forum in the future, if you want to take full advantage of it.