Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. SELECT rating FROM performance_Review WHERE employee_ID IN( SELECT employee_ID from employee WHERE manager_id = ".$m_id.") ORDER BY date_of_pr DESC If you want to use the GROUP BY you have to select the employee_ID as well, but since you just want the latest, there is no need to group by employee_id, if you wanted to do a sum of all their ratings that would be different.
  2. To read in file_get_contents. To save fopen fwrite and fclose. The manual should have plenty of examples for how to utilize those items..
  3. Try: DELETE FROM mysql.user WHERE User = 'jess' You can limit that further by adding the host or database, do a DESC mysql.user For other fields you could query by.
  4. $string = "1. e4 {[%emt 0.0]} e5 {[%emt 0.0]} 2. Nf3 {[%emt 2.304]} Nc6 {[%emt 1.703]} 3. Bb5 {[%emt 1.645]} a6 {[%emt 1.375]} 4. Ba4 {[%emt 1.816]} Nf6 {[%emt 1.578]} 5. O-O {[%emt 1.649]} Be7 {[%emt 9.047]} 6. d3 {[%emt 16.644]} b5 {[%emt 9.25]} 7. Bb3 {[%emt 1.7]} d6 {[%emt 19.453]} 8. Ng5 {[%emt 7.848]} O-O {[%emt 3.656]} 9. Nd2 {[%emt 32.157]} h6 {[%emt 1.828]} 10. Ndf3 {[%emt 37.154]} hxg5 {[%emt 6.375]} 11. Nxg5 {[%emt 1.27]} Nd4 {[%emt 54.375]} 12. Bd5 {[%emt 13.521]} c6 {[%emt 2.938]} 13. c3 {[%emt 25.264]} cxd5 {[%emt 31.453]} 14. cxd4 {[%emt 14.905]} exd4 {[%emt 14.578]} 15. exd5 {[%emt 7.107]} Nxd5 {[%emt 7.218]} 16. Qh5 {[%emt 12.054]} Bxg5 {[%emt 24.828]} 17. Bxg5 {[%emt 3.941]} Nf6 {[%emt 5.547]} 18. Qf3 {[%emt 6.093]} Bg4 {[%emt 27.25]} 19. Qf4 {[%emt 61.961]} Re8 {[%emt 72.844]} 20. Rae1 {[%emt 17.542]} Be2 {[%emt 19.36]} 21. Bxf6 {[%emt 126.822]} Qxf6 {[%emt 10.5]} 22. Qxf6 {[%emt 14.586]} gxf6 {[%emt 3.843]} 23. Rxe2 {[%emt 1.539]} Rxe2 {[%emt 2.265]} 24. h3 {[%emt 6.326]} Rae8 {[%emt 17.484]} 25. Rc1 {[%emt 9.823]} Rxb2 {[%emt 5.156]} 26. Kh2 {[%emt 6.435]} Rxf2 {[%emt 11.922]} 27. Rc6 {[%emt 10.228]} Ree2 {[%emt 7.656]} 28. Rc8+ {[%emt 4.025]} Kg7 {[%emt 1.813]} 29. Kg3 {[%emt 20.22]} Rxg2+ {[%emt 2.796]} 30. Kf4 {[%emt 8.0]} Rxa2 {[%emt 40.281]} 31. Rc1 {[%emt 34.16]} b4 {[%emt 4.813]} 32. Kf3 {[%emt 5.201]} b3 {[%emt 5.969]} 33. h4 {[%emt 16.199]} Rac2 {[%emt 10.469]} 34. Rb1 {[%emt 14.643]} b2 {[%emt 5.344]} 35. h5 {[%emt 6.386]} Rh2 {[%emt 25.047]} 36. Rg1+ {[%emt 16.05]} Kh7 {[%emt 5.531]} 37. Kg4 {[%emt 30.38]} Rc1 {[%emt 7.969]} 38. Rxc1 {[%emt 4.443]} bxc1=Q {[%emt 8.61]} 39. Kg3 {[%emt 3.555]} Qg1+ {[%emt 11.218]} 40. Kf3 {[%emt 25.04]} Rh3+ {[%emt 30.704]} 41. Ke4 {[%emt 7.596]} {White resigns} 0-1"; $output = preg_replace('~{.*}~U', '', $string); echo $output; Should get you where you requested. Output: 1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. d3 b5 7. Bb3 d6 8. Ng5 O-O 9. Nd2 h6 10. Ndf3 hxg5 11. Nxg5 Nd4 12. Bd5 c6 13. c3 cxd5 14. cxd4 exd4 15. exd5 Nxd5 16. Qh5 Bxg5 17. Bxg5 Nf6 18. Qf3 Bg4 19. Qf4 Re8 20. Rae1 Be2 21. Bxf6 Qxf6 22. Qxf6 gxf6 23. Rxe2 Rxe2 24. h3 Rae8 25. Rc1 Rxb2 26. Kh2 Rxf2 27. Rc6 Ree2 28. Rc8+ Kg7 29. Kg3 Rxg2+ 30. Kf4 Rxa2 31. Rc1 b4 32. Kf3 b3 33. h4 Rac2 34. Rb1 b2 35. h5 Rh2 36. Rg1+ Kh7 37. Kg4 Rc1 38. Rxc1 bxc1=Q 39. Kg3 Qg1+ 40. Kf3 Rh3+ 41. Ke4 0-1
  5. if (isset($_FILES['file']) && !empty($_FILES['file'])) { // do processing }else { // don't do processing } Would be a way to check that a file variable was passed in.
  6. You may also need to use set_time_limit and set it to 0 in the script so that it does not time out. The script could just possibly be timing out. The other way, as I stated, is to look into a flash / java uploader.
  7. Of course, your other option is using a Flash / Java uploader. Which can be a bit nicer and friendlier for the users to work with Especially for large files and status updates etc.
  8. Umm, it depends on your system for the memory limit. But when files are uploaded they are read into memory and then stored in a temporary file (at least that is my impression). But if your computer only have 512MB of memory on it, well it would be unwise to set it to higher then 384MB imo. So depending on your system, choose wisely. For the 200MB file test, I would set it to 384M and see how that works for you.
  9. You also have to up the memory_limit variable as well and make sure you restart apache after making those changes to the php.ini
  10. If you are serious about news letters for the masses, it would probably be wise to look up "Email Marking" on google and look into a paid service to do this for you. Doing this on one server takes time and can just bog down the mail server. If you are seriously looking into doing this on your server, you can add the emails to be sent to a database and run a cron job every x minutes and send the emails out to x people at a time. So if your server handles 100 emails a minute, you set the cron to send 100 emails every 2 minutes. There are probably scripts out there that do this too, PEAR::Mail maybe one to look at.
  11. There sure is, using an switch statement and passing a parameter to the function function multi(which) { switch (which) { case 1: // case 1 code here break; case 2: // case 2 code here break; } } Should treat you right. Since I do not know how you call this method, here is an example call using a href. <a href="javascript:multi(1);">Multi - 1</a> Will send you to the case 1 statement.
  12. If you are using firebug, check your logs. I am not so sure that getElementById('name').value is a valid parameter for that object.
  13. The return values should really tell you what should be returned, if it returns a boolean, well chances are the array is passed by reference. We can easily find this out by looking under the "Description:" The & represents that the array is passed by reference, which means that the variable which is passed in will contain the updated information. This is not to mention the Example usages section: Which show you how to properly use the function.
  14. I am not a javascript expert, but putting them outside of the function "should" make them global IE: var n1 = document.getElementById('net1').value; var n2 = document.getElementById('net2').value; var n3 = document.getElementById('net3').value; var n4 = document.getElementById('net4').value; var n5 = document.getElementById('net5').value; var n6 = document.getElementById('net6').value; var n7 = document.getElementById('net7').value; var n8 = document.getElementById('net8').value; var n9 = document.getElementById('net9').value; var n10 = document.getElementById('net10').value; function one() { // processing here with n1 etc. } function two() { }
  15. Add some error message to your mysql_query: mysql_query("QUERY HERE") or trigger_error("Unabled to do [ACTION HERE].<br />Error: " . mysql_error()); And this will tell you if there is an error in your query syntax. I have a hunch that in your insert 0 should be null.
  16. By trying and finding some tutorials of how to do just that? http://articles.techrepublic.com.com/5100-10878_11-5035149.html
  17. Just READ THE FUCKING MANUAL. Come on now! EDIT: Removed images for everyone's sake.
  18. Karl, It is your HTML form. <button type="submit" class="button" id="submit" name="submit">Login</button> I know has issues with IE etc. They do not like buttons nor do they recognize them. You have two choices. using the <input type="submit" name="submit" class="button" value="Login" /> Or by submitting the form with a "button" like design with Javascript. Also, you do not need to surround $_SERVER['PHP_SELF'] in the form action with the htmlentities, this is unnecessary.
  19. Generally speaking, when a login works on Firefox, but no others, it means your HTML form has errors. Firefox has a nasty habit of correcting these minor html tag problems, others do not. Look at your html tags and make sure they are correct syntax and properly closed etc.
  20. I think you would want to use the mail that or if you are really ambitious, look into PEAR::Mail or phpMailer (phpMailer = script found via google). You already know the answer, you just have to take the time to do the research and figure out the howto.
  21. Simply one statement comes to mind with this stupid thread. "Fighting on the internet is like running in the special Olympics... Even if you win, you are still retarded in the end." He moved your thread, BOOHOO, go and cry your eyes out and tell your mom. He called me a princess, BOOHOO, go and cry again and then get told by your mom to Grow up.
  22. Or you could just stop posting here and take your questions to another forum. I am sure that will show the staff here to be nice to you! Wow...did you figure that all out by yourself? I mean it is not like the site is branded with that information or that the whois of the domains could lead to potential contact information...I am amazed!
  23. Please, go and get a piece of paper, write all the nasty things you are feelling and would like to tell us about Thorpe. Once you have written them down, goto your bathroom and deposit them in the comment box called "John" and all comments / suggestions will be taken seriously. Look forward to seeing your comments!
  24. What is the column type of the other column is it just utf8 or utf8_bin?
  25. Does your server support mod_rewrite? If not you may have to enable it, if it does you have to allow access to it via the vhosts / httpd configuration file under the <Directory /path/to/your/site/> AllowOverride All Here is an article to help out with figuring out if that is the culprit: http://www.debian-administration.org/articles/136
×
×
  • 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.