RE: [PHP] Re: accessing a mysql column by number

From: Date: Thu, 28 Mar 2002 14:18:30 +0000
Subject: RE: [PHP] Re: accessing a mysql column by number
Groups: php.general 
Request: Send a blank email to php-general+get-90519@lists.php.net to get a copy of this message
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:newsgroup@developerforum.net] Sent: Thursday, March 28, 2002 8:18 AM To: php-general@lists.php.net 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

« previous php.general (#90519) next »