At 19:33 +0200 9/24/03, Philippe MAIRE wrote:
Hi
I would like to execute a select on a table for which i don't know the
column names.
IE I would like a command like
select column(1) from table where ...

Sure, if I ask, it is because I cannot use the desc command.

You can use SELECT but you cannot use DESCRIBE?


Can you use the result of:

SELECT * FROM tbl_name WHERE 0

which returns the metadata for the result set, and an empty (zero-row)
result set.


I have another solution which causes again a problem : if I could execute a function on the result of "desc table" I explain myself :

I access a mysql base through a fixed php script (which i can't modif),
which takes for input a request in an html form, executes it and gives me
back the numeric value of the first row, first column
So when i know the field name and to retreive what I want, i can do
select ascii(mid(col1,1,1)) from table where ...
so doing this char by char I get the entire string.
But the problem is that I haven't found the way to execute that
ascii(mid(...)) function on the result of "desc table" or "show tables" etc

Anyone sees something ?

Philippe



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to