[PHP] Re: accessing a mysql column by number
Is there a way to access a column in Mysql just by using a number? Please refer to the MySQL-Documentation. A database doesn't have any predefined structure, so you're responsible for doing this. Can you explain why you need this feature? Like if you had three columns called column1, column2, and column3 and I wanted to access column3 just by using the number 3 This could simply be done by using prefixes: $col = $prefix.$number Jens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: accessing a mysql column by number
Jens, A database does have a structure. The order in which the columns/fields are defined is their numeric order. Second, mysql_fetch_row() will accomplish what he needs. Third, we answered this yesterday. -Original Message- From: Jens Lehmann [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 8:18 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: accessing a mysql column by number Is there a way to access a column in Mysql just by using a number? Please refer to the MySQL-Documentation. A database doesn't have any predefined structure, so you're responsible for doing this. Can you explain why you need this feature? Like if you had three columns called column1, column2, and column3 and I wanted to access column3 just by using the number 3 This could simply be done by using prefixes: $col = $prefix.$number Jens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: accessing a mysql column by number
Hi Rick, thanks for correcting me. (numeric order) I thought he just wants to select one col. (SELECT 3rd column FROM table ... ) I didn't read your answer because it was not in the same thread (reading the news with MS Outlook Express), because the subject-line changed. Can you suggest me a newsreader which can manage this? I assume this is the wrong place to ask, so if you don't want to answer, please tell me where to find the answer. (I didn't find it in any FAQs.) Sorry for asking such a stupid question. Jens Jens, A database does have a structure. The order in which the columns/fields are defined is their numeric order. Second, mysql_fetch_row() will accomplish what he needs. Third, we answered this yesterday. -Original Message- From: Jens Lehmann [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 8:18 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: accessing a mysql column by number Is there a way to access a column in Mysql just by using a number? Please refer to the MySQL-Documentation. A database doesn't have any predefined structure, so you're responsible for doing this. Can you explain why you need this feature? Like if you had three columns called column1, column2, and column3 and I wanted to access column3 just by using the number 3 This could simply be done by using prefixes: $col = $prefix.$number Jens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php