php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1714 number
Submitted: 1999-07-14 13:36 UTC Modified: 1999-07-14 14:09 UTC
From: frank at freestyling dot de Assigned:
Status: Closed Package: MySQL related
PHP Version: 3.0.8 OS: freebsd
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: frank at freestyling dot de
New email:
PHP Version: OS:

 

 [1999-07-14 13:36 UTC] frank at freestyling dot de
Topic:
<?php 
                        mysql_connect($host,$user,$password);
                        $result = mysql_db_query("database","select * from table");
                        while($row = mysql_fetch_object($result)) {
                            echo $row->user_id;
                            echo $row->fullname;
                        }
                        mysql_free_result($result);
?>

when i use the optional constants (while($row = mysql_fetch_object($result,'???'))
"The optional argument result_typ is a constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and MYSQL_BOTH. "
i allways get the error:Wrong parameter count for mysql_fetch_object().

WHy

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-14 14:08 UTC] eschmid at cvs dot php dot net
You should use mysql_fetch_object ($resullt, MYSQL_ASSOC);

-Egon
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Aug 01 21:00:03 2025 UTC