Jump to content

shebbycs

Members
  • Posts

    174
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

shebbycs's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. I had SQL Query like this and I am using oracle 10g and then I click the expressions to do that if or case loop so I want to know how the expression syntax work or at least example of the expressions In this image I want to know example of expression can be do inside it
  2. but how to call first and last in sql developer if first and last is invalid identifier
  3. SELECT HIREDATE FROM EMP WHERE ROWNUM<=1 ORDER BY HIREDATE; ? is it like this?
  4. ok let said I had called the min hiredate for the first hired how can i call that person only ? because if i did like min hiredate and min ename it will not give the first hired date person
  5. I had try for the date i using for max and min but when to call together with name I did not manage to make it because it will showing many name since i used the group by that part I stuck
  6. I had data like this empno ename job mgr hiredate sal comm deptno 7369 SMITH CLERK 7902 1980-12-17 800 NULL 20 7499 ALLEN SALESMAN 7698 1981-02-20 1600 300 30 7521 WARD SALESMAN 7698 1981-02-22 1250 500 30 7566 JONES MANAGER 7839 1981-04-02 2975 NULL 20 1) Display the name and hire date of the employee who was hired first without using subquery 2) Display the name and hire date of the employee who was hired last without using subquery
  7. There are 3 questions which are : 1. Group functions work across many rows to produce one result per group (My answer : Yes) 2. Group functions include Null in calculations (My answer : Yes and No) 3. There WHERE clause restricts rows prior to inclusion in a group calculations. (My answer : Yes) But each of these questions need to give a example for every statement Hope you can help me please Thank you
  8. If u see in Microsoft Excel table when we write each field its automatically when to next line without entering the "Enter" key, is it possible to do in HTML and how to do that any example please
  9. //countercashadminlocation2.php <?php session_start(); ini_set('session.bug_compat_warn', 0); ini_set('session.bug_compat_42', 0); if (empty($_SESSION['is_logged_in'])) { header("Location:login.php"); die(); // just to make sure no scripts execute } ?> <?php mysql_connect("localhost","root") or die(mysql_error()); mysql_select_db("kime") or die(mysql_error()); $a=$_SESSION['branchcodename']; if (isset($_POST["submit"])) { $place = $_POST['tempat']; $_SESSION['tempat']=$place; $b= $_SESSION['tempat']; $sql1 = mysql_query("SELECT *,DATE_FORMAT(Form_Date, '%d/%m/%Y %H:%i %p') AS Form_Date FROM counter_cash WHERE Branch_Codename='$place' ORDER BY Form_Date") or die(mysql_error()); $sql2 = mysql_query("SELECT ID FROM counter_cash WHERE Check_By ='' AND Branch_Codename='$place' ") or die(mysql_error()); echo "<body bgcolor='#F5D16A'>"; echo "<center><img src ='OK.gif'></center><br>"; echo "<center><h2>COUNTER CASH CHECKING REPORT</h2>"; echo "<table><tr><td><h3>LOCATION</h3></td><td><h3>:</h3></td><td><h3>".$place."</h3></td></tr></table></center>"; echo "<center><table border = '1'>"; echo "<tr><th rowspan='2'>ID</th><th rowspan='2'>DATE & TIME</th><th rowspan='2'>CASHIER NAME</th><th colspan='3'>COUNTER CASH</th><th colspan='3'>PETTY CASH</th><th rowspan='2'>SIGN</th><th rowspan='2'>HANDOVER TO (NAME)</th><th rowspan='2'>SIGN</th><th rowspan='2'>CHECK BY</th><th rowspan='2'>CHECK SYMBOL</th></tr>"; echo "<tr><th>AMOUNT</th><th>SHORTAGE</th><th>EXCESS</th><th>AMOUNT</th><th>SHORTAGE</th><th>REMARK</th></tr>"; while($report = mysql_fetch_array($sql1)) { echo "<tr align='center'><td>".$report['ID']."</td>"; echo "<td>".$report['Form_Date']."</td> "; echo "<td>".$report['Cashier_Name']."</td> "; echo "<td>RM ".$report['Counter_Amount']."</td> "; echo "<td>RM ".$report['Counter_Shortage']."</td> "; echo "<td>RM ".$report['Counter_Excess']."</td> "; echo "<td>RM ".$report['Petty_Amount']."</td> "; echo "<td>RM ".$report['Petty_Shortage']."</td> "; echo "<td>".$report['Petty_Remark']."</td> "; echo "<td>".$report['Cashier_Sign']."</td> "; echo "<td>".$report['Handover_Name']."</td> "; echo "<td>".$report['Handover_Sign']."</td> "; echo "<td>".$report['Check_By']."</td> "; echo "<td>"; echo "<input type='button' name='check[]' value=".$report['ID'].">"; echo "</td>"; } echo"</tr></table></center><br>"; /* echo"<center><form name='editcheckby' method='post' action='countercashadmineditcheckby2.php'>"; echo "<table><tr><td><b>CHOOSE ID TO CHECK BY</b></td></tr><tr><td><center><select name = 'cuba'>"; while($checkby = mysql_fetch_array($sql2)) { echo "<option value ='".$checkby['ID']."'>".$checkby['ID']."</option>"; } echo "</select></center></td></tr>"; echo "<tr><td><center><input type='submit' name='submit' value='Check'></center></td></tr></table></form>"; */ echo "<center><h3><a href='adminselect.php'>BACK</a> <a href='logout.php'>LOG OUT</a></h3></center>"; } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript"> function a() { var x = document.select.branchcodename.value; if(x=="") { alert("Please choose branch location"); return false; } } </script> </head> <body bgcolor="#F5D16A"> <center> <img src="OK.gif" /> <table border="0" align="center"> <form name="select" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" onsubmit="return a()"> <tr><td><center><h1>CHOOSE COUNTER CASH CHECKING REPORT LOCATION</h1></center></td></tr> <tr><td><center>Branch Codename:<select name="tempat"> <option value="OK01">OK</option> <option value="TK02">TK</option> </select></center></td></tr> <tr><td><center><input type="submit" name="submit" value="Submit"></center></td></tr> </form> </table> </center> </body> </html> <?php } // $sql3 = mysql_query("UPDATE counter_cash SET Check_By ='$a' WHERE Check_By ='' "); // $sql4 = mysql_query("UPDATE counter_cash2 SET Check_By ='$a' WHERE Check_By ='' "); ?> My screenshot is It is possible when i click check symbol it update the check by name? how it update to check by name when clicking button on check symbol? The check by name I took after the login Session and the update query in countercashadmineditcheckby2.php <?php session_start(); if (empty($_SESSION['is_logged_in'])) { header("Location:login.php"); die(); // just to make sure no scripts execute } ?> <?php mysql_connect("localhost","root") or die(mysql_error()); mysql_select_db("kime") or die(mysql_error()); $a=$_SESSION['branchcodename']; $b=$_SESSION['tempat']; if (isset($_POST["Check"])) { $b=$_SESSION['tempat']; $checkby=$_POST['cuba']; $sql1 = mysql_query("UPDATE counter_cash SET Check_By = '$a'") or die(mysql_error()); $_SESSION['is_logged_in'] = 1; if($_SESSION['is_logged_in'] == 1) { header("Location: countercashadminviewedit2.php"); } } ?> I confusing how to send data from countercashadminlocation to countercashadmineditcheckby2.php because as I know if using dropdown it will send base on select name but about button I was confused, hope someobody can help me
  10. I had made modification where that tick or check mark I added one field named "Check_By_Mark" where collation is utf8_unicode_ci //countercashadminlocation.php <?php session_start(); ini_set('session.bug_compat_warn', 0); ini_set('session.bug_compat_42', 0); if (empty($_SESSION['is_logged_in'])) { header("Location:login.php"); die(); // just to make sure no scripts execute } ?> <?php mysql_connect("localhost","root") or die(mysql_error()); mysql_select_db("kime") or die(mysql_error()); $a=$_SESSION['branchcodename']; if (isset($_POST["submit"])) { $place = $_POST['tempat']; $_SESSION['tempat']=$place; $b= $_SESSION['tempat']; $sql1 = mysql_query("SELECT *,DATE_FORMAT(Form_Date, '%d/%m/%Y %H:%i %p') AS Form_Date FROM counter_cash WHERE Branch_Codename='$place' ORDER BY Form_Date") or die(mysql_error()); $sql2 = mysql_query("SELECT ID FROM counter_cash WHERE Check_By ='' AND Branch_Codename='$place' ") or die(mysql_error()); echo "<body bgcolor='#F5D16A'>"; echo "<center><img src ='OK.gif'></center><br>"; echo "<center><h2>COUNTER CASH CHECKING REPORT</h2>"; echo "<table><tr><td><h3>LOCATION</h3></td><td><h3>:</h3></td><td><h3>".$place."</h3></td></tr></table></center>"; echo "<center><table border = '1'>"; echo "<tr><th rowspan='2'>ID</th><th rowspan='2'>DATE & TIME</th><th rowspan='2'>CASHIER NAME</th><th colspan='3'>COUNTER CASH</th><th colspan='3'>PETTY CASH</th><th rowspan='2'>SIGN</th><th rowspan='2'>HANDOVER TO (NAME)</th><th rowspan='2'>SIGN</th><th rowspan='2'>CHECK BY </th></tr>"; echo "<tr><th>AMOUNT</th><th>SHORTAGE</th><th>EXCESS</th><th>AMOUNT</th><th>SHORTAGE</th><th>REMARK</th></tr>"; while($report = mysql_fetch_array($sql1)) { echo "<tr align='center'><td>".$report['ID']."</td>"; echo "<td>".$report['Form_Date']."</td> "; echo "<td>".$report['Cashier_Name']."</td> "; echo "<td>RM ".$report['Counter_Amount']."</td> "; echo "<td>RM ".$report['Counter_Shortage']."</td> "; echo "<td>RM ".$report['Counter_Excess']."</td> "; echo "<td>RM ".$report['Petty_Amount']."</td> "; echo "<td>RM ".$report['Petty_Shortage']."</td> "; echo "<td>".$report['Petty_Remark']."</td> "; echo "<td>".$report['Cashier_Sign']."</td> "; echo "<td>".$report['Handover_Name']."</td> "; echo "<td>".$report['Handover_Sign']."</td> "; echo "<td>".$report['Check_By_Mark']."</td> "; } echo"</table></center><br>"; echo"<center><form name='editcheckby' method='post' action='countercashadmineditcheckby.php'>"; echo "<table><tr><td><b>CHOOSE ID TO CHECK BY</b></td></tr><tr><td><center><select name = 'cuba'>"; while($checkby = mysql_fetch_array($sql2)) { echo "<option value ='".$checkby['ID']."'>".$checkby['ID']."</option>"; } echo "</select></center></td></tr>"; echo "<tr><td><center><input type='submit' name='submit' value='Check'></center></td></tr></table></form>"; echo "<center><h3><a href='adminselect.php'>BACK</a> <a href='logout.php'>LOG OUT</a></h3></center>"; } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript"> function a() { var x = document.select.branchcodename.value; if(x=="") { alert("Please choose branch location"); return false; } } </script> </head> <body bgcolor="#F5D16A"> <center> <img src="OK.gif" /> <table border="0" align="center"> <form name="select" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" onsubmit="return a()"> <tr><td><center><h1>CHOOSE COUNTER CASH CHECKING REPORT LOCATION</h1></center></td></tr> <tr><td><center>Branch Codename:<select name="tempat"> <option value="OK01">OK</option> <option value="TK02">TK</option> </select></center></td></tr> <tr><td><center><input type="submit" name="submit" value="Submit"></center></td></tr> </form> </table> </center> </body> </html> <?php } // $sql3 = mysql_query("UPDATE counter_cash SET Check_By ='$a' WHERE Check_By ='' "); // $sql4 = mysql_query("UPDATE counter_cash2 SET Check_By ='$a' WHERE Check_By ='' "); ?> //countercashadmineditcheckby.php <?php session_start(); if (empty($_SESSION['is_logged_in'])) { header("Location:login.php"); die(); // just to make sure no scripts execute } ?> <?php mysql_connect("localhost","root") or die(mysql_error()); mysql_select_db("kime") or die(mysql_error()); $a=$_SESSION['branchcodename']; $b=$_SESSION['tempat']; if (isset($_POST["submit"])) { $b=$_SESSION['tempat']; $checkby=$_POST['cuba']; $sql1 = mysql_query("UPDATE counter_cash SET Check_By = '$a',Check_By_Mark='✓' WHERE ID = '$checkby'") or die(mysql_error()); $_SESSION['is_logged_in'] = 1; if($_SESSION['is_logged_in'] == 1) { header("Location: countercashadminviewedit.php"); } } ?> //countercashadminviewedit.php <?php session_start(); if (empty($_SESSION['is_logged_in'])) { header("Location:login.php"); die(); // just to make sure no scripts execute } ?> <?php mysql_connect("localhost","root") or die(mysql_error()); mysql_select_db("kime") or die(mysql_error()); $a=$_SESSION['branchcodename']; $b=$_SESSION['tempat']; $sql1 = mysql_query("SELECT *,DATE_FORMAT(Form_Date, '%d/%m/%Y %l:%i %p') AS Form_Date FROM counter_cash WHERE Branch_Codename='$b' ORDER BY Form_Date") or die(mysql_error()); $sql2 = mysql_query("SELECT ID FROM counter_cash WHERE Check_By ='' AND Branch_Codename='$b'") or die(mysql_error()); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body bgcolor='#F5D16A'> <center><img src ='OK.gif'></center><br> <center><h2>COUNTER CASH CHECKING REPORT</h2><table><tr><td><h3>LOCATION</h3></td><td><h3>:</h3></td><td><h3><?php echo $b; ?></h3></td></tr></table></center> <center><table border = '1'> <tr><th rowspan='2'>ID</th><th rowspan='2'>DATE & TIME</th><th rowspan='2'>CASHIER NAME</th><th colspan='3'>COUNTER CASH</th><th colspan='3'>PETTY CASH</th><th rowspan='2'>SIGN</th><th rowspan='2'>HANDOVER TO (NAME)</th><th rowspan='2'>SIGN</th><th rowspan='2'>CHECK BY</th></tr><tr><th>AMOUNT</th><th>SHORTAGE</th><th>EXCESS</th><th>AMOUNT</th><th>SHORTAGE</th><th>REMARK</th></tr> <?php while($report = mysql_fetch_array($sql1)) { ?> <tr align='center'><td><?php echo $report['ID'];?></td><td><?php echo $report['Form_Date'];?></td><td><?php echo $report['Cashier_Name'];?></td><td>RM <?php echo $report['Counter_Amount'];?></td><td>RM <?php echo $report['Counter_Shortage'];?></td><td>RM <?php echo $report['Counter_Excess'];?></td><td>RM <?php echo $report['Petty_Amount'];?></td><td>RM <?php echo $report['Petty_Shortage'];?></td><td><?php echo $report['Petty_Remark'];?></td><td><?php echo $report['Cashier_Sign'];?></td><td><?php echo $report['Handover_Name'];?></td><td><?php echo $report['Handover_Sign'];?></td><td><?php echo $report['Check_By_Mark'];?></td></tr><?php } ?> </table></center><br /><center> <form name='editcheckby' method='post' action='countercashadmineditcheckby.php'><table><tr><td><b>CHOOSE ID TO CHECK BY</b></td></tr><tr><td><center><select name = 'cuba'> <?php while($checkby = mysql_fetch_array($sql2)) { ?> <option value = <?php echo $checkby['ID'];?>><?php echo $checkby['ID'];?></option> <?php } ?> </select></center></td></tr> <tr><td><center><input type='submit' name='submit' value='Check'></center></td></tr></table></form> <center><h3><a href='adminselect.php'>BACK</a> <a href='logout.php'>LOG OUT</a></h3></center> </body> </html> So when I am inserting into phpmyadmin I got this symbol in my phpmyadmin I got that ace symbol and when i want to retrieve it and put in table I got that double?symbol hope anybody can solve
  11. May I know any example to insert data using input type=text and the data was input is ✓ How to insert it and how to retrieve it
  12. yeah I saw but all was text where mine is text in textarea ok i post another picture If you see in field let said now I want to input one data which is line number 13 that show Time = 10.00 am Task = Morning Briefing Operation = 1) Sales Performance Review Staff A = RM 5,000.00 Staff B = RM 3700.00 Staff C = RM 4,200.00 2) Staff Performance Review a) Service Performance Review b) Attendance Performance Review and all this data is inserted in one line where the operation input data I label as text area My data can be shown same like this picture above using that nl2br function but only if the person who input data in text area using "Enter" keystroke to move new line but as we know when we write in textarea after it reached lts limit column it will automatically move to the next line but still if using nl2br function, the data were not in linebreak same according to the first one i mention About word wrap how it will be balance the word if first line for example was 25 but second form the first line was 30
  13. how to do that ? but if I know if wordwrap its set the limit how many character in one line right?
×
×
  • 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.