In which file can i add custom sql complex queries to fetch data from another database table and how?

If i want to fetch data from one database table and display that data in my custom module using complex sql queries then in which file should i add sql query and how??

and also how can i make dropdown with values fetching from another database table using sql queries??

Parents Reply Children
  • Hello Francesca Shiekh !!!

    Thank you for your reply but let me explain through an example what i

    exactly want..

    Suppose i have a module let's say it as Patients and in the patients

    module,i have further informations of patient including patient city and

    near by hospitals.Now when i select patient's city from dropdown then in

    the near by hospitals field,i want to display hospitals in that dropdown

    fetched from another db table which contains all hospitals according to

    cities.

    On Thu, Jan 10, 2019 at 4:17 AM Olivier Nepomiachty <