Hi Djulia,
Unbelievable!! It works!! Many, many thanks.
However, I still have a problem. You can check the following SQL query:
SELECT
cmsb_outpatients_clinic.first_name,
cmsb_outpatients_clinic.phone,
cmsb_outpatients_clinic.num,
CONCAT('<a href="admin.php?menu=outpatients_clinic&action=view&num=', num, '">', 'View', '</a>') AS Link
FROM
cmsb_outpatients_clinic INNER JOIN cmsb_visits ON cmsb_outpatients_clinic.num = cmsb_visits.foreignFieldNum
Unfortunately, when it runs, the following message appears:
Unfortunately, when it runs, the following message appears:
I assume the problem is because two sections are used in the query (cmsb_visits and cmsb_outpatients_clinic), and the field numexists in both. Do I need to identify which one of the two numfields I will use? As in the href the section cmsb_outpatients_clinic is used, the numfield should be from this section. I tried to use the following,
CONCAT('<a href="admin.php?menu=outpatients_clinic&action=view&num=', cmsb_outpatients_clinic.num=num, '">', 'View', '</a>') AS Link
but it did not work either.
Do you have a suggestion?
Kind regards,
Andreas