Bug #1450: wrong array size

From: Date: Tue, 25 May 1999 14:17:27 +0000
Subject: Bug #1450: wrong array size
Groups: php.dev 
Request: Send a blank email to php-dev+get-5983@lists.php.net to get a copy of this message
From: fcartegn@univ-valenciennes.fr Operating system: solaris 2.6 PHP version: 3.0.8 PHP Bug Type: Dynamic loading related Bug description: wrong array size this is a function from my class which access sql. I got only 1 row(of 3 item) in my database but sizeof($this->$lignes) returns 3 ?!? function read(){ $conn=mysql_connect("ultraistv8"); if(!mysql_select_db("test",$conn)){echo ("Cannot select database.\n");} $sql="select * from phptest"; if(!($result=mysql_query($sql,$conn))) { $sql="create table phptest (php char(50), test char(50), login char(50))"; if(!mysql_query($sql,$conn)) { echo ("Error creating test table.\n"); }else{ echo ("test table creee<br>"); } }else{ $j=0; while(($data=mysql_fetch_row($result))){ $this->$lignes[$j++]=$data; } } mysql_close($conn); echo sizeof($this->$lignes); } -- 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 (#5983) next »