I think by issuing a SELECT * FROM tblTableName will execute your query
without knowing the column names.
But you can also issue a SHOW FIELDS FROM tblTableName to get a list of the
table columns.

Hope this helps,

Thanks
Emery
----- Original Message -----
From: "Philippe MAIRE" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 24, 2003 19:33
Subject: Reading a table without knowing column names


> 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.
>
> 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]
>
>
>



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

Reply via email to