Finding the table_name without using mysql_table_name?
Posted: Fri Jul 12, 2002 3:10 pm
Is there a simple way of retrieving the name of the table that you are doing a data query from?
My script pulls data from a table and puts it into a form so that the data can be edited and then resubmitted back to the database using UPDATE. The table that it gets the original data from is specified as a variable in the script URL ie; http://localhost/edit.php?table=tableone etc
Once the data has been edited in the form then I want it to go back into the table 'tableone' but the 'tableone' variable no longer exists because the script has already be executed once, so I can't use that variable.
Not sure I am describing this very well.
Anyway I tried using the mySQL table_name function along with list_tables but you have to give a index number for that function and the number of tables in the database can vary and often changes so that isn't much help.
Hmmm.......
Anyone got any idea what I'm talking about here!?
My script pulls data from a table and puts it into a form so that the data can be edited and then resubmitted back to the database using UPDATE. The table that it gets the original data from is specified as a variable in the script URL ie; http://localhost/edit.php?table=tableone etc
Once the data has been edited in the form then I want it to go back into the table 'tableone' but the 'tableone' variable no longer exists because the script has already be executed once, so I can't use that variable.
Not sure I am describing this very well.
Anyway I tried using the mySQL table_name function along with list_tables but you have to give a index number for that function and the number of tables in the database can vary and often changes so that isn't much help.
Hmmm.......
Anyone got any idea what I'm talking about here!?