Eclipse PDT terminates at: $row = @$result->fetch_assoc()

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I am learning PHP5 in Ubuntu Linux. I use Eclipse PDT with Zend Debugger.

My problem is that following code:

ORDER BY region_name ASC;");
     while ($row = @$result->fetch_assoc()) {    // HERE PROBLEM
        $regions[$row['region_id']] = $row['region_name'];

    object(mysqli)#1 (0) { } object(mysqli_result)#2 (0) { }

and terminates at command:
    $row = @$result->fetch_assoc()

<terminated, exit value: 0>/opt/eclipse/plugins/

I mean that the problem occurs in Eclipse PDT (run or debug mode).
When I open the page with this code in a browser, everything is OK.

Please help.

Re: Eclipse PDT terminates at: $row = @$result->fetch_assoc()

Jivanmukta escribió:
Quoted text here. Click to load it

The @ operator removes the error messages: get rid of it and you'll be
able to see what's wrong (most likely, something related to the trailing
semicolon in the SQL query, which is not valid in most MySQL DB layers).

You also need to:

- Enable full error reporting in your dev box'x php.ini file:
    - error_reporting = E_ALL (or even E_ALL | E_STRICT)
    - display_errors = On

- Add error checking to your code (e.g., check the values returned by
function calls)

Quoted text here. Click to load it

That's probably because you're hiding error messages with @.

-- - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
-- Mi web de humor al baño María:

Site Timeline