Hello,
I'v a problem with one of my queries. this is how the database looks like:
tblLanguage
LID | vcvalue
tblVideo
LID | VID | vcvalue
tblDvd
LID | DID | vcvalue
...
Since there are a lot of tables, i want to make 1 query for all :-)
I need the maximum value from colomn 2 (VID, DID,...).
My query: $qry = 'select max(2) from '. $_POST["tblName"];
$_POST["tblName"] = the name of the table (tblVideo, tblDvd,...)
But with this query, I always get the value 2 (but I need the max value of the second column... not the max of "2" ;-) )
(order by 2 works, but apparently this does not) Does anyone know a solution for my problem? (Or a function that retrieves the column name or something like that)
Thanks in advance
B