Jump to content

topflight

Members
  • Posts

    402
  • Joined

  • Last visited

    Never

Everything posted by topflight

  1. But I have 1300 rows with different times. Also what about the times that are like: 620 how can I make them say 6:20?
  2. So I am confused which code should I use the 1st one or second and what should I replace?
  3. In my table I have a column called "dtime" and "atime". However when I received the CSV and uploaded it to the database the times were not in time format they just like a simple string for instance, 1720 is in one of the rows but instead of saying 17:20 it says 1720. I have over 13,000 records. May somebody please give me an example on how I can change all those to the correct time format thanks.
  4. I don't understand what you are saying. The code I posted does not insert the same date over and over - it pulls the date from the database, reformats it, and puts it back in. I apologize for the improper grammar lol. I was saying shouldn't I get the date from the database instead of having the date as today's date. Every member will have a different report date. However what I am trying to accomplish is to see which members haven't filed a report within 30 days of their last report date.
  5. How can I change it without loosing or messing up the current dates that are stored in there? Also I shouldn't before date be variable since I have taht date in the datbase. As everymember report date will be different depending on the date they fileed it.
  6. How can I change it without loosing or messing up the current dates that are stored in there? Also I shouldn't before date be variable since I have taht date in the datbase. As everymember report date will be different depending on the date they fileed it.
  7. I have a table called "members" and in that members table it has a couple of fields. However the main two I am trying to deal with now is the last_report. I want to create a script to show all the members who hasn't filed a report within the last 30 days of the report date in the database. The fields are dates (e.g mm.dd.yyyy) Please help thanks in advanced.
  8. Ok may you please give me an example code please.
  9. May I please have an example on how to do this. I have over 13000 rows in the table with this problem.
  10. However all this data was in a CSV so it their a way to fix this problem with a php script or code?
  11. Hello I have some columns where the time format is incorrect lets say that the time is 17:30 will in the database it will show 1730 or another example lets say that the time was suppose to be 6:30 instead it is 630. I would go in and edit each one of them except their is 15,000 rows, so may someone please tell me on how I can fix this problem thanks.
  12. Hello I have some columns where the time format is incorrect lets say that the time is 17:30 will in the database it will show 1730 or another example lets say that the time was suppose to be 6:30 instead it is 630. I would go in and edit each one of them except their is 15,000 rows, so may someone please tell me on how I can fix this problem thanks.
  13. That link you provided is doesn't work. and the date column are entered like mm.dd.yyyy. Is it possible if someone can write me a quick example?
  14. May I please have an example, as I am kind of confuse I want to see if they haven't done a flight 20 or 30 days or more from their last flight.
  15. Hello so I am creating some what of a virtual airline script. And I would like a script that shows pilots who haven't done a flight within 30 days of their last flight and 20 days within their last flight. I have a table called flights and everytime a pilot submit a flight report it insert the pilot name,login etc.. and the date of the flight. I also have another table called members with just the pilot information in it passwords,etc... and last flight. The last flight field is a date and so is date of flight. I need help create a script that shows all the pilots who haven't flown a flight 20 and 30 days within their last flight. And maybe 20 could be yellow and 30 or more can be red. Please give me some examples or help on how I can start this. Thanks in advanced.
  16. I have tried echoing out the hourly and I get the correct responce but when I echo out: $money = "$hourly" * "$dur"; I get 0
  17. Ok i troubled shot it and now I test out all the variables but the problem is that $hourly is empty but $rank is not.
  18. I echo out he rank and it says one of the ranks it is just not multiplying for some reason.
  19. My current code looks like this if($rank =='CATI'){$hourly='1500';}elseif($rank == 'CATII'){$hourly == '2500';}elseif($rank == 'CATIII'){$hourly == '4500';}elseif($rank == 'CATIV'){$hourly ='8000';}elseif($rank =='CATV'){$hourly ='10000';} $money = $hourly * $dur; $finalcut = $money + $pmoney; And it is still not doing the math correctly I am getting 0 for the $finalcut And just and FYI the dur is a decimal number like 2.5
  20. I have 2 variables a nd they are not multiplying. here is what my code looks like: if($rank =='CATI'){$hourly='1,500';}elseif($rank == 'CATII'){$hourly == '2,500';}elseif($rank == 'CATIII'){$hourly == '4,500';}elseif($rank == 'CATIV'){$hourly ='8,000';}elseif($rank =='CATV'){$hourly ='10,000';} $pmoney = $rr["money"]; $money = "$hourly" * "$dur"; $finalcut = "$money" + "$pmoney"; Also the $pmoney is part of a mysql_fetch_assoc but the problem I am having is that $money is not multiplying please help. Thanks in advanced
  21. I am starting to get it a little bit, can you please write the whole SQL with variables and everything please
  22. I am confused how can I do that?
  23. It is decimal(4,0) thats the way I reccevied it and I have 15,000 records so I which I can put ":" between the hour and min. will it still work tho?
×
×
  • 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.