Bug #743: fields wrongly parsed when Decimal(x,x) defined in table

From: Date: Sun, 13 Sep 1998 19:15:37 +0000
Subject: Bug #743: fields wrongly parsed when Decimal(x,x) defined in table
Groups: php.dev 
Request: Send a blank email to php-dev+get-1036@lists.php.net to get a copy of this message
From: analyzer@kemuri.net Operating system: linux PHP version: 3.0.3 PHP Bug Type: MySQL related Bug description: Hi, When I'm asking the fieldnames of a Mysql table, the lists stops when a decimal-fields has been reached. This is the output: productid 20 name 255 sourceurl 255 price 8 This is the table definition: productid varchar(20) not null, name varchar(255) not null, sourceurl varchar(255), price decimal(8,2), vat varchar(3), weight decimal(5,2), category mediumint, min2order tinyint, options text, I guess the comma is wrong in Decimal.. Here's is a piece of code for version 3.0.3.. Kind Regards, Geert <? $MY = mysql_pconnect("localhost","analyzer","AnA56g!"); mysql_select_db("linuxcorner",$MY); function ProductForm($productid) { global $MY; $res = mysql_query("select * from products",$MY); $fieldsnr = mysql_list_fields("linuxcorner", "products"); echo '<TABLE BORDER="0">'; for($i=0; $i <= $fieldsnr; $i++) { $fname = mysql_field_name($res,$i); $flength = mysql_field_len($res, $i); echo "<TR><TD>$fname $flength</TD>\n"; "</TR>"; } echo '</TABLE>'; } ProductForm("blah"); ?> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#1036) next »