Jump to content

gple

Members
  • Posts

    166
  • Joined

  • Last visited

Everything posted by gple

  1. I put the query within an if statement and it is failing.
  2. there is no error, nothing happens
  3. I am passing a integer variable as $paid. I want to run an update query so that it adds the amount to a particular column: mysql_query("UPDATE captains_list SET amount_paid=amount_paid+$payment where id='$id'"); this code obviously does not work. can someone look at this.
  4. I have three pages, the first page I put in all my data, the second page is basically a confirmation page saying to confirm what I just did, but then I want to pass the data to a third page without actually using the post method.
  5. mysql_query("select * from table where cat='$variable'") what value must $variable be to select all records?
  6. question regarding this functionality. I currently have a directory that only has photos in it and I want to make a slideshow out of it. When clicking on the link, the first image in the directory appears but I would also like to have a next button that appears and clicking on it will go to the next image in the directory. there should also be a previous button that will let me go to the previous picture by clicking on it. Any suggestions on the best way to do this.
  7. works well but i am also returning "." and ".." why is that?
  8. Is there anyway to ouput all of the files associated in a directory. I have found some functions that allow you to do this but the server needs to be set up with PHP5 and my server currently is running on 4+. Any suggestions around this.
  9. I have a variable time=13:15:00 (time of day). how to I add another hour and 15 minutes to that time.
  10. How do I create an if statement where I am checking for a certain string of characters. If ($comments has ALL in it) for instance
  11. How do i use today's date to find all records in an SQL statement that are all within one year of todays date. $date="2007-10-31"; $tday=date("Y-m-d"); how do i run a query to check if $date is less than one year of $tday.
  12. $date="2008-09-29"; what function can i use to display the day of the week for the variable $date
  13. yeah I got it. thanks.
  14. yes echoes as expected.
  15. mysql_query("INSERT INTO tables (user_id) VALUES ('$username')"); this coding is not inserting the variable that is being passed. Instead it is placing a 0.
  16. If I have a variable that is a date (2004-01-01). How do I get the day of the week in which that date falls on.
  17. for ($i=0;$i<10;$i++) { $seed.$i=$array[0]; } i want to assign 10 variables ($seed0 through $seed9). How do i do that with the above?
  18. Ah that was the code I was looking for. Now it works exactly the way I like it.
  19. sorry guys. I figured it out.
  20. When AB=7 and H=3. Then AB/H should output .428. Instead its outputting .43. and then when I use your code it outputs .430
  21. I did and I am still getting it to two decimal places. I think something has to be done in the query where I coded (HITS/AB) as AVG. I think there is more coding involved here to have AVG go to three decimal places.
  22. When I output AVG. It rounds up to the second decimal place. I want to be able to output rounding up/down to the third decimal place.
×
×
  • 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.