This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The bug has already been described several times both on the Netbeans forum and on Stackoverflow, please be referred to the following links: http://stackoverflow.com/q/23848434/3253673 http://forums.netbeans.org/topic52344.html http://stackoverflow.com/q/20508619/3253673 http://stackoverflow.com/a/23853490/3253673 Thank you in advance for your answer!
Attach at least xdebug.log file and sample smallest project where it can be reproduced. NB just shows data sent by xdebug, so it probably sends -1 because of something (probably error in mysql query, or in xdebug).
Where do I find xdebug.log file, I've already searched my whole computer?
http://xdebug.org/docs/all_settings and xdebug.remote_log option. And are you really sure that it should return "1" in your case? Have you echoed it in a code? Manual says that -1 is returned when the query returned an error... [1] And of course read something from comment about how that function works, e.g.: Example: Ignoring duplicate key errors while inserting some rows containing data provided by user only if they will match specified unique constraint causes returning of -1 value by mysqli->affected_rows even if rows were inserted. (checked on MySQL 5.0.85 linux and php 5.2.9-2 windows). However mysqli->sqlstate returns no error if statement was executed successfully. Imho it will definitely not be a problem if NB ;) [1] http://www.php.net/manual/en/mysqli.affected-rows.php
Created attachment 147425 [details] 1 out of 3
Created attachment 147426 [details] 2 out of 3
Created attachment 147427 [details] 3 out of 3
I've created these 3 files for you to test, please. I've slightly simplified the code (variables declaration in main.php is now static), but should work. The original version, in any case, run without any problems in the web browser, but not in Xdebug (in Xdebug "Error" is echoed, but even then the data is correctly inserted into the database...)
Created attachment 147430 [details] Screenshot affected_rows = 1 ...in this screenshot you can see in the variables window (on the right) that affected_rows = 1 and still the "if" evaluates to false and Xdebug jumps not to line 85 but 92 upon the next "step into" (F7). Please let me know your thoughts...