Date: 09/13/98
- Next message: Joel Walsh: "[PHP-DEV] Re: Bug #590 Updated: File Upload Seg Fault"
- Previous message: Shane Caraveo: "RE: [PHP-DEV] Bug #741: Adding 86400 seconds to Oct. 25 1998 gives wronganswer"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: analyzer <email protected>
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 <email protected> For help: php-dev-help <email protected>
- Next message: Joel Walsh: "[PHP-DEV] Re: Bug #590 Updated: File Upload Seg Fault"
- Previous message: Shane Caraveo: "RE: [PHP-DEV] Bug #741: Adding 86400 seconds to Oct. 25 1998 gives wronganswer"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

