Hey,
is there any way you can reference a table's field/ column name by the index its is in the list of the table's field
e.g.
I'm trying to select rows from $table left join another table on another tables id = the $table's id
$table is a variable populated from a list...
is there a MYSQL_FIELD_OFFSET(0,$table) thingy?
Kendall
reference a tables field by its index
Moderator: General Moderators
if you already know the field names, just join on those.
if you need to find the keys, you can run a query like this:
if you need to find the keys, you can run a query like this:
Code: Select all
SHOW KEYS FROM `tablename`- kendall
- Forum Regular
- Posts: 852
- Joined: Tue Jul 30, 2002 10:21 am
- Location: Trinidad, West Indies
- Contact:
Sorta kinda but if im using a single statement and i just need to condition 1 field which is the first field isnt there a way to write the "FIRST_FIELD" of the table in question at the time.?Burrito wrote:if you already know the field names, just join on those.
if you need to find the keys, you can run a query like this:Code: Select all
SHOW KEYS FROM `tablename`
wieerduhm....Spockulator?