I have 5 dropdowns on a tab of a website. I have a database table in MS SQL Server. The table has all the data of 5 dropdowns with one of the fieldNames called Region_Name, say the Region_Names are A, B, C, D, and E. I have written codes to display a table and enabled row editing for one of the RegionNames. Now, I am wondering if I could modify the same codes to display associated table with row editing enabled using different queries when a dropdown is clicked. That could reduce the code repetition and improve the performance. But I do not know how to achieve this. Could anyone please give me some hints? I am using PHP PDO to connect to the database.
** Moved to PHP Code **
How to Display Individual Tables in Dropdowns from SQL?
Moderator: General Moderators
-
sarojthapa60
- Forum Newbie
- Posts: 8
- Joined: Sun Sep 11, 2016 9:36 pm
Re: How to Display Individual Tables in Dropdowns from SQL?
Are the field names the same? Could you pass the table name in as a parameter to the method you're calling? Hard to be more specific without seeing your existing code or the table schemas.