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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 04:01:31 2024 UTC