|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [1999-06-12 16:56 UTC] jim at cvs dot php dot net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 08:00:01 2025 UTC | 
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); }