Jump to content

june_c21

Members
  • Posts

    280
  • Joined

  • Last visited

    Never

Everything posted by june_c21

  1. if i put SELECT user.acc_no, report1.staff_no, user.name, user.bank FROM user, report1 WHERE report1.staff_no = user.staff_no and bank='MAYBANK' it return empty result
  2. i try to put 'MAYBANK' or 'Maybank' or 'maybank'. still return empty result
  3. barand, yes. got maybank in that column
  4. i try to put AND but still return empty result. there is data and rows for these `report1.staff_no`='user.staff_no' AND `user.bank`='Maybank' if i put select * from user where user.bank='maybank' also return empty result.
  5. sorry, my english is poor and i can't get what you means. can you explain more details.
  6. hi, why when i wrote SELECT user.acc_no, report1.staff_no, user.name FROM user,report1 WHERE report1.staff_no = user.staff_no && user.bank ='Maybank' group by staff_no it return zero result. if i write the querry without user.bank ='Maybank' it return the result. What happen?
  7. hi, why when i wrote SELECT user.acc_no, report1.staff_no, user.name FROM user,report1 WHERE report1.staff_no = user.staff_no && user.bank ='Maybank' group by staff_no it return zero result. if i write the querry without user.bank ='Maybank' it return the result. What happen?
  8. sorry... is <select name="gf" id="gf"> and <input name="text1" type="text" id="text1"> i have no idea how to start it that's why i asking for help. I hope you guys can coach me more.. i don't expect you guys write it out all.... just guide me... tq
  9. hi, i just want to find out how to write the search function. My database table content gf,package, title. Example, when user click on 'GF1'from the drop down menu then it will automatically list the only GF1 available 'package' . then user choose the 'package' and type the keyword (title). PLease help. Appriciate that... Thanks a lot <form name="form1" method="post" action="search.php"> <select name="gf" id="gf"> <option value="GF1">GF1</option> <option value="GF2">GF2</option> <option value="GF3">GF3</option> </select> <select name="package" id="package"> <option value="Pack 1">Pack 1</option> <option value="Pack 2">Pack 2</option> </select> <input name="gf" type="text" id="gf"> <input type="submit" name="Submit" value="Search"> </form>
  10. i am using Y-m-d(2008-02-01). but the result still 2008-Feb-Fri ...
  11. when i wrote 2008-02-01 it came out 2008-Feb-Fri instead of 2008-02-15. How to solve this?
  12. hi, i doing a simple library system. just want to find out how to write code for due date? borrowing date + 14 days. How to do that? please help. thanks
  13. i have instal phpmyadmin but i still can't open it.
  14. hi, i had install apache 2.0.63 , php 5.2.5 and mysql 5.0 into my computer which running on window xp. i can open localhost, phpinfo but when i type http://localhost/phpmyadmin - error : page can't display. can i know what is the reason ? thanks
  15. this warning i get when i put it in Warning: Invalid argument supplied for foreach() in /var/www/Web/eclaim/add.php on line 27
  16. so i need to declare $item = ?? sorry, i bit stupid..... need more explanation and guide. hope u guys don't mind
  17. i'm not asking for writing out the code. i just want a guide of my error only as i new with php. i need to take data (tarikh) from a form that contain 10 lines. if user enter only 5 lines then it will store 5 lines in the database instead of 10lines
  18. i try to use while (!is_null($tarikh)) the same problem appear where it keep on looping the data.
  19. i change it to $tarikh but it doesnt insert the data into the database.
  20. i want to insert multiple row of data into the database. when it come to 'tarikh is NULL (empty) it will stop the loop. how to write that?
  21. when i run this code, it keep on looping and insert data into my database. What's wrong? <title>E Claim</title> <?php session_start(); $host = 'localhost'; $user = 'root'; $password = 'admin'; $dbase = 'eclaim'; $dblink = mysql_connect($host,$user,$password); mysql_select_db($dbase,$dblink); $staff_no = $_POST['staff_no']; $address1 =$_POST['address1']; $address2 =$_POST['address2']; $address3 =$_POST['address3']; $jenis_kenderaan =$_POST['jenis_kenderaan']; $kenderaan_no =$_POST['kenderaan_no']; $cc =$_POST['cc']; $status =$_POST['status']; $tarikh =$_POST['tarikh']; $perjalanan =$_POST['perjalanan']; $masa =$_POST['masa']; $km =$_POST['km']; $tol =$_POST['tol']; $parking =$_POST['parking']; $elauan =$_POST['elauan']; $tujuan =$_POST['tujuan']; while (tarikh !=NULL) { $query= "INSERT INTO claim (staff_no,address1,address2,address3,jenis_kenderaan,kenderaan_no,cc,status,tarikh,perjalanan,masa,km,tol,parking,elauan,tujuan) VALUES ('$staff_no', '$address1','$address2','$address3','$jenis_kenderaan','$kenderaan_no','$cc','$status','$tarikh','$perjalanan','$masa','$km','$tol','$parking','$elauan','$tujuan') "; $result = mysql_query($query,$dblink); } $query1 = "Select claim.staff_no,user.staff_no,user.department from claim,user where user.staff_no = user.staff_no "; $result1 = mysql_query($query1,$dblink); $myrow1 = mysql_fetch_row($result1); $no = "EC/ "; $department =$myrow1[2] ; if (department == 'Generating Facility 1') { $body="<em>HTML</em> formatted <strong>Message</strong>"; //$headers = "From: administrator@eclaim.com \r\n"; $headers = "Content-Type: text/html; charset=ISO-8859-1 "; $headers .= "MIME-Version: 1.0 "; mail("june@kaparenergy.com.my", "Lubrication", $body, $headers); $query2 = "Select gf1,id from runningno "; $result2 = mysql_query($query2,$dblink); $myrow2 = mysql_fetch_row($result2); //echo "00"."$myrow2[0]"." / "; $query3 ="update runningno set id=id+1, gf1=gf1+1"; $result3 = mysql_query($query3,$dblink); $no = $no . "GF1 / 0".$myrow2[0]. "/0".$myrow2[1]; } else { } while (tarikh !=NULL) { $query13 = "UPDATE claim SET tran_id='$no' WHERE id = '$id' "; $result13 = mysql_query($query13,$dblink); } $query40= "Select tran_id from claim "; $result40 = mysql_query($query40,$dblink); $myrow40 = mysql_fetch_row($result40); echo "$myrow40[0]"; ?>
  22. hi, how to insert multiple line (row) data into database with the same textfield name? Example : Text A Text B Text C Tex D Text E Text F
×
×
  • 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.