php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1450 wrong array size
Submitted: 1999-05-25 10:17 UTC Modified: 1999-06-12 16:56 UTC
From: fcartegn at univ-valenciennes dot fr Assigned:
Status: Closed Package: Dynamic loading
PHP Version: 3.0.8 OS: solaris 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fcartegn at univ-valenciennes dot fr
New email:
PHP Version: OS:

 

 [1999-05-25 10:17 UTC] fcartegn at univ-valenciennes dot fr
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);	
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-12 16:56 UTC] jim at cvs dot php dot net
Syntax is wrong. You want $this->lignes.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jul 06 02:01:28 2020 UTC