Jump to content

684425

Members
  • Content Count

    34
  • Joined

  • Last visited

Community Reputation

0 Neutral

About 684425

  • Rank
    Member
  1. Sir, I am following your advice. I have normalized my database and now I am working on app to remove errors that is why my reply is lateπŸ™‚
  2. SELECT tbl1.pay AS bpay, tbl2.grade AS t1, tbl3.grade AS t2, tbl4.grade AS t3, tbl5.hours1 AS d1, tbl6.hours2 AS d2, tbl7.hours3 AS d3 FROM employees AS tbl1 LEFT JOIN employees AS tbl2 ON tbl1.time1 = tbl2.id LEFT JOIN employees AS tbl3 ON tbl1.time2 = tbl3.id LEFT JOIN employees AS tbl4 ON tbl1.time3 = tbl4.id LEFT JOIN overtimes AS tbl5 ON tbl2.grade = tbl5.ranks LEFT JOIN overtimes AS tbl6 ON tbl3.grade = tbl6.ranks LEFT JOIN overtimes AS tbl7 ON tbl4.grade = tbl7.ranks WHERE tbl1.id = 67 The above query returns result including red highlighted values which I am trying to remove
  3. From tables shown in image, I am trying to run a query for employee 67 which return only one row containing id, pay from employee table and from overtime table i want to choose values from columns hours1, hours2, hours3 based on references mentioned in employees table. I have highlighted the values in both tables for which i want to run the query.
  4. I was not sure whether i should separate them or not, but after your advice i separated them πŸ™‚
  5. Sir, your query worked as expected but last day after posting my problem here i searched for the solution. From w3schools i found one example in SELF JOIN. SELECT A.fname AS yourname, B.fname AS yourbossname FROM employee A, employee B WHERE A.boss_id = B.id Not challenging your knowledge and your experience but just for increasing my knowledge. Do both LEFT JOIN and SELF JOIN are same in working or is there any difference in both? PS: if its up to you, which one you would like to prefer?πŸ™‚
  6. I have an employees table which stores id as auto increment values, names of employees and boss id chosen from the same table. I want to run a query which shows result as Hi Jane Doe, your BOSS is John Doe But it seems beyond my knowledge. Any help please? I have attached image of similar data
  7. Thank you for your help. With some modification, it works fine πŸ™‚
  8. In some countries 123456789 amount of currency of in general, it is counted as (if i am not wrong) one hundred twenty three million, four hundred fifty six thousand, seven hundred and eighty nine. Comma separated format is 123,456,789 But in some countries (like mine) the same amount is counted as twelve crore, thirty four lac, fifty six thousand seven hundred and eighty nine. Comma separated format is 12,34,56,789 As we people are used to the second format that is common here, the thousands separated format mostly confuses us in reading.
  9. In php number format function works like.... number_format("1000000",2); // 1,000,000.00 is there a way to format numbers like... 10,00,00,000 (from right. No decimal. First comma after 3 digits and then commas after every 2 digits)
  10. The code in attached file is not working for me. and i am failed to find any mistake. Anyone help me please. deletedept.php
  11. Plz check attached file. it does not give any error when letters are typed. new.html
  12. <input id="numb" type="number" /> <input type="submit" onclick="myFunction()" /> <p id="demo"></p> <script> function myFunction(){ var x = document.getElementById('numb').value; var regex=/^[1-9]+$/; if (x == ""){ document.getElementById('demo').innerHTML = "Input is Missing"; } else if (!x.match(regex)){ document.getElementById('demo').innerHTML = "Input Incorrect"; } else { document.getElementById('demo').innerHTML = "Input OK"; } } /* if (x == "") { document.getElementById('demo').innerHTML = "Input is Missing"; } else if (isNaN(x)) { document.getElementById('demo').innerHTML = "Input Incorrect"; } else { document.getElementById('demo').innerHTML = "Input OK"; } } */ </script> When input type is "text" it works fine. but when i change input type to "number" and then if i type letters or letters plus numbers. it says "input missing" How can i get correct output while using input type "number" ? Please guide. Thankyou.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.