Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. A string CAN contain integers. If you want only a-z, use a regex.
  2. You can't have a foreach in a string. This code will generate errors. You have to add to the string within the loop.
  3. Thanks. OP: See the link in my signature for your error.
  4. So then loop through the rows and send the emails.
  5. How many emails do you want to get? One for each row? Or one containing all the info for every row that matches? And right now, you just told it to email you, with no logic.
  6. They need to be a DATE field. Unless you need the time too, then a DATETIME.
  7. I doubt that completiondate is the only column you'll need to select, but: SELECT completiondate FROM needs WHERE completiondate = DATESUB(NOW(), INTERVAL 2 DAY)
  8. Well, if they are MySQL functions, where do you think you would use them?
  9. I said MySQL has the function DATESUB. Not PHP. You clearly looked it up to get the syntax... but then just stuck it in as PHP code?
  10. MySQL has a DATESUB function you can use.
  11. Did anyone else read the title as Reindeer? No? Just me? Ok. Your code has no if statement in it, and no logic. What did you try so far? strtotime is a php function, and won't work inside a string like that.
  12. If there's no admission number, why would printing it to the screen do any good? Do you understand what your code does? Did you lookup what print_r does?
  13. Do you have error reporting on? You'll want to use isset, and sanitize your data. Use print_r to see what was POSTed
  14. What are you stuck on? You've already done 1, what's the problem?
  15. Jesus. Nevermind. Do it the way that worked. Then go read some basic tutorials.
  16. You got an error, and don't show us what it is? I wrote it using my keyboard.
  17. $q1_cycle_oil = "SELECT SUM(amount) AS q1_cycle_oil_exp FROM expense_fuel WHERE fuel_code = 017 AND year = $exp_year AND month between 01 and 03"; echo "Query: $q1_cycle_oil "; $q1_cycle_oil_results = mysql_query($q1_cycle_oil) or die(mysql_error()); $row = mysql_fetch_array($q1_cycle_oil_results); echo "result: ".$row['q1_cycle_oil_exp']; print '<pre>'; print_r($row); What do you get?
  18. Just run the query. No if/else, just echo the sum!
  19. That makes no sense. Why don't you just echo the sum no matter what it is???
×
×
  • 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.