Data Abstraction Layer
Posted: Tue Feb 04, 2003 10:44 am
Yes I know there are many to choose from, and are better written but I am trying to create my own to learn. This code returns an multiple deminsion array with all the results but the last record always returns null values. I have created a identical one with mysql and everything works well. I am sure the last row has data (if I limit the results to 10, 9 have data if I limit the same code to 5, 4 have data). Obviously I am not showing all the functions, all are returning the correct data. I think it has todo with the for loop. Any thoughts.
Code: Select all
$this->qry = @mssql_query( $this->GetSql(), $this->GetConnId() );
if ( $this->GetNumRows() > 0 ){
for($i = 0; $i < $this->GetNumRows(); $i++){
$this->resultї$i] = mssql_fetch_assoc( $this->qry );
}
return $this->result;