php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2922 mysql_result doesn't work with tables
Submitted: 1999-12-06 05:18 UTC Modified: 2000-07-30 09:29 UTC
From: hrauch at help-pi dot f dot shuttle dot de Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0 Beta 3 OS: Linux 2.2.10
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: hrauch at help-pi dot f dot shuttle dot de
New email:
PHP Version: OS:

 

 [1999-12-06 05:18 UTC] hrauch at help-pi dot f dot shuttle dot de
With php 3.12 the following lines worked very well:

$result3 = mysql ( "schul_db" , 
  "SELECT spf.TextKey " .
  "FROM Schulst_SprFolge=st_spf,Key_Sprachenfolge=spf " .
  "WHERE  (st_spf.StelleID='$st_id') AND (st_spf.CodeKey=spf.CodeKey)" );
         
      $num3 = mysql_numrows ( $result3 );
      $i3 = 0;
      WHILE ( $i3 < $num3 )
      {
        $sprachenfolge    = mysql_result ( $result3 , $i3 , "spf.TextKey" );
        ...
        $i3 ++;
      }

With 4.0 B3 this warning is displayed:

Warning: spf not found in MySQL result index 4 in /home/www/doc/schule/schul-db/index.php3 on line 192

If I remove "spf.", everything is fine:

$sprachenfolge    = mysql_result ( $result3 , $i3 , "TextKey" );

On the other hand, the following lines - with the same logical structure as above - were executed without any error:

$result4 = mysql ( "schul_db" , 
  "SELECT * FROM Schulst_Vorausse=st_vor, Key_Voraussetzung=vor " .
  "WHERE  (st_vor.StelleID='$st_id') AND (st_vor.CodeKey=vor.CodeKey)" );
 $num4 = mysql_numrows ( $result4 );
 $i4 = 0;
 $voraus = "";
 WHILE ( $i4 < $num4 )
 {
   $vor = mysql_result ( $result4 , $i4 , "vor.TextKey" );
    ..
   $i4 ++;
 }



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-23 02:57 UTC] zak at cvs dot php dot net
I will do some testing.
 [2000-07-30 09:29 UTC] zak@php.net
Similar problems have been reported as closed by other users.  Please try the current release of PHP.  If the problem re-occurs, please open a new bug report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 19:01:33 2024 UTC