From: [EMAIL PROTECTED]
Operating system:
PHP version: 4.0.4pl1
PHP Bug Type: Scripting Engine problem
Bug description: field name in mysql_lsit_fields
When using "mysql_list_fields" for a file you can extract
the field names of the schema.
For example: $fname. Then turn it into the variable for the
schema name as $$fname.
$$fname = 'something'; // **** works
$$fname[0] = 'something'; // **** don't work
---------------------------------------------------
Example
---------------------------------------------------
$schema = mysql_list_fields("wine","wpo_dtl");
$nf = mysql_num_fields($schema); // get num of fields
$xx = mysql_fetch_array($schema);
while ($i < $nf) {
$fname = mysql_fieldname($schema,$i);
//***** this works *****
$$fname = 'something';
// ******* this don't
$x = 0;
$$fname[$x] = 'something';
}
What am I doing wrong???
--
Edit Bug report at: http://bugs.php.net/?id=10412&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]