Posts

Showing posts with the label netbeans-8

How to select code in Netbeans 8.2

How to select code in Netbeans 8.2 I'm using netbeans 8.2 and can't figured out how to select code in curly braces in PHP files. The same in quotes. For example if($x == false) I want quick select all line inside curly braces. The same in this line, how to select text only in quotations marks echo 'Some wrong text here'; Also sometimes I need to select code between php tags <?php code here ?> . Netbeans is a nice and cool IDE so I want to learn about features that can help in coding. <?php code here ?> Thanks in advance for your helping 2 Answers 2 So, if we write if ($x = 'Something Wrong') ALT + SHIFT + . first select text in quotations marks, then select text in curly braces. Very nice. echo 'Some wrong text here'; ALT + SHIFT + . the same combination here, but it select quotes, too. Hoping my answer help someone :) Please specify you netbeans v...

use COUNT(*) to count multiple rows from multiple tables in netbean

use COUNT(*) to count multiple rows from multiple tables in netbean So I want to count the total number of sales for each seller from two different tables. And I wrote down the code but it does not work..... Can anyone please help me??? So it should produce that sellerID =1 and count = 13. sellerID=2 and count= 14. Something like this. So I want to produce 3 total amount of sales for each seller, but the output shows the red lines .... String sellerID = {"1","2","3"}; int num = 0; String totalAmountSale = new String[3]; String sql = "SELECT tblOrder.SellerID, COUNT(*) " + "FROM tblOrder, tblSeller " + "WHERE tblOrder.SellerID = tblSeller.SellerID " + "GROUP BY tblOrder.SellerID" + "ORDER BY tblOrder.SellerID;"; ResultSet rs = db.query(sql); try { while(rs.next()) { totalAmountSale[num]= ""+rs.getInt(2); ...