php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9736 mssql_fetch_array not consistent
Submitted: 2001-03-14 00:25 UTC Modified: 2001-03-14 00:33 UTC
From: vhegde at myersinternet dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.1pl2 OS: NT 4.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vhegde at myersinternet dot com
New email:
PHP Version: OS:

 

 [2001-03-14 00:25 UTC] vhegde at myersinternet dot com
 mssql_fetch_array is not consistent in the results
> it fetches when referred to using the numeric
> indices of the returned array, as compared to the
> results obtained by referring to the array as an
> associative one.
> For example ,i've had erratic results when doing the
> following ...
> 
> $sql = "select * from table"
>  
> $client_results = mysql_query($sql,$conn);
> 
> $client_row = mysql_fetch_array($client_results);
> 
> mysql_free_result($client_results);
> 
> echo $client_row[0];
> echo $client_row[1];
> echo $client_row[2];
> ...
> array[0] sometimes shows the data in the first
> element correctly and sometimes it displays the
> column name of the returned data...quite erratic.
> 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-14 00:33 UTC] sniper@php.net
So which one is this? MSsql OR MySQL ??

Anyways, you're using very old version of PHP.
Update first to PHP 4.0.4pl1 and reopen if this 
problem still exists with it.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 13:01:30 2024 UTC