Jump to content

ibanez270dx

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Everything posted by ibanez270dx

  1. Yeah, is that what it's called? Anyone here have anything on it?
  2. Hi, How can I add formatting tools to my textarea like the ones here on PHP Freaks? You know, when you post a new thread or reply or whatever, and there are buttons above the textarea that do different things...? Thanks, - Jeff
  3. Hi, Just a quick little question, how do I make sure that a variable has exactly 5 characters? Thanks, -Jeff
  4. Thanks - but there is a problem with it. My Select Boxes are hard coded and I need the PHP to decide which option is selected... here is my code: Currently, it autoselects "No Crew" every time.... [code=php:0] if($dwntime_type == "unscheduled") { $unscheduled_s = "selected"; } if($dwntime_type == "progressive") { $progressive_s = "selected"; } if($dwntime_type == "No Crew") { $nc_s = "selected"; } [/code] HTML: [code] <select tabindex=1 name="dwntime_type" size="1" width="107"> <option value="scheduled">Scheduled</option> <option value="unscheduled" selected="<? echo $unscheduled_s; ?>">Unscheduled</option> <option value="progressive" selected="<? echo $progressive_s; ?>">Progressive</option> <option value="nc" selected="<? echo $nc_s; ?>">No Crew</option> </select> [/code] Anyone know what I'm doing wrong or what I can do to fix this? Thanks, - Jeff
  5. Hi, Is it possible to have a certain value of a drop-down box be selected automatically? For example, in my logging system, everytime someone wants to edit an entry, the date gets reset (I have month, day, and year drop down boxes). All of those boxes are hard coded... is it even possible to do what I want to do? Thanks, - Jeff
  6. This is what I ended up with, and it works:  :) Thanks for your help!!! [code=php:0] $dt1 = "$dwntime_year $dwntime_month $dwntime_day"; $dt2 = str_replace(' ', '', $dt1); $op_start = '05:00'; $op_end  = '23:00'; $downtime_start = max($dwntime_hrs1, $op_start); $downtime_end = min($dwntime_hrs2, $op_end); $dt3 = "$dt2 $downtime_start"; $dt4 = "$dt2 $downtime_end"; $downtime_hrs_start = strtotime($dt3); $downtime_hrs_end = strtotime($dt4); $dwntime_hrs = ($downtime_hrs_end-$downtime_hrs_start)/3600; [/code]
  7. that works great! The only thing is that the minutes don't work... here is the code, I had to debug it a bit: Any reason why the minutes wouldn't work? [code=php:0] $mnt_start = '02:00'; $mnt_end  = '13:30'; $op_start = '05:00'; $op_end  = '23:00'; $downtime_start = max($mnt_start, $op_start); $downtime_end = min($mnt_end, $op_end); $display = ($downtime_end-$downtime_start); [/code]
  8. ok, so if the user had to enter the hours manually like "05:00" or something, how would I convert that to a timestamp? I still don't know how I would be able to do it, even if it is stored as a timestamp... Can you explain?
  9. Hi, I have run into a problem in a program I'm writing for my client... Heres the story: I am developing a system that logs the downtime of aircraft due to many different reasons. One of them is maintenance. The maintenance work is based on a 24 hour day. Thus, the log is based on a 24 hour time scale where a user can log a downtime (ex: 05:00 to 14:30). However, the hours of operation for these aircraft is based on an 18 hour day (05:00 to 23:00). What I need to do is to be able to take a 24hr day maintenance log and convert it to an 18hr day to log the downtimes in operation. Here is an example: Let's say that the aircraft is down for maintenance between the hours of 01:00 and 08:00. I need to convert this 24 hour scale to an 18 hour scale. In actuallity, I need to take the overlapping hours and store them in a variable. The hours of operation are 05:00 to 23:00, thus with the example of 01:00 to 08:00, I would count 05:00 to 08:00. How would I do that? Its kinda confusing, I know, but any help is greatly appreciated!!!! Thank you! - Jeff
  10. Thanks! I used this: [code=php:0] foreach (glob("*.xls") as $filename) {   unlink($filename); } [/code] It works perfectly. And yes, I did need to delete all the files with a *.xls extension.
  11. Hi, I'm trying to do an unlink command like so: unlink(*.xls) . It doesn't work and I have tried it with single and double quotes. Can anyone help me? Thanks! - Jeff
  12. Hi, I have a script that dynamically creates an .XLS, saves it on the server, and then opens it ... but I want to delete it after the user exits the .XLS. I used the unlink($myfile) command on the line after I used meta tags to open the .XLS automatically, but it deleted before it even opened. If I can just dynamically create the excel and open it without saving to my server first, that would be even better. Anybody know something that can help me out? Any help is appreciated, - Jeff
  13. wow... that was pretty obvious...  :-[  thanks for your help!!
  14. Hi, How do I check if a file exists on my server? I am currently using an if($filename2) where the $filename2 is thename.xls (the files are located in the same directory). This doesn't seem to work... it just automatically goes to the statement afterward even if the file doesn't exist. Someone please help! Thanks, - Jeff
  15. Hi, Just a quick question... I need this to work, but it redirects to "$filename2" instead of "thename.xls". [code] echo '<META http-equiv="refresh" content="0;URL=$filename2">'; [/code] What can I do with the quotes and stuff to make it work? Thanks, - Jeff
  16. Hi, I have a portion of code that dynamically creates an XLS file - which works - and then it posts the information into the correct cells - which works. The problem is that only a bit of it actually formats correctly according to my code. So the top bar (the column labels) works pretty ok. The bgcolor tag works and so does the text formatting in each cell. However, the width tag doesn't work - same with the style tag. Oddly enough, the bottoms of the cells are misaligned in every other cell. Even a bigger problem, none of the tags in the second table (data) work, except the text formatting. I still need it to be vertically aligned in the middle, and the cell background be #e5e5e5 in every other cell. Lastly, there are no gridlines when the file is opened... which seems really weird. Here is my code: [code=php:0] $catanames = " <table width=95% style=border: 1px solid; border-color:#000000;><tr> <td bgcolor=#000000 width=100><font color=#FFFFFF><center><b>Type</b></center></font></td> <td bgcolor=#000000 width=100><font color=#FFFFFF><center><b>Date</b></center></font></td> <td bgcolor=#000000 width=100><font color=#FFFFFF><center><b>Downtime</b></center></font></td> <td bgcolor=#000000 width=100><font color=#FFFFFF><center><b>Hours Down</b></center></font></td> <td bgcolor=#000000 width=100><font color=#FFFFFF><center><b>ATA</b></center></font></td> <td bgcolor=#000000><font color=#FFFFFF><center><b>Discrepancy</b></center></font></td> <td bgcolor=#000000><font color=#FFFFFF><center><b>Resolution</b></center></font></td> <td bgcolor=#000000 width=120><font color=#FFFFFF><center><b>Logged</b></center></font></td> <td bgcolor=#000000 width=150><font color=#FFFFFF><center><b>Logged By</b></center></font></td> </tr></table>"; $data .= " <table width=95%><tr> <td bgcolor=#e5e5e5 width=100 valign=middle valign=middle><center>$dwntime_type</center></td> <td width=100 valign=middle><center>$dwntime_date</center></td> <td width=100 valign=middle bgcolor=#e5e5e5><center>$dwntime_times</center></td> <td width=100 valign=middle><center>$dwntime_hrs</center></td> <td width=100 valign=middle bgcolor=#e5e5e5><center>$dwntime_ata</center></td> <td valign=middle><center>$dwntime_reason</center></td> <td valign=middle bgcolor=#e5e5e5><center>$dwntime_solution</center></td> <td width=120 valign=middle><center>$dwntime_log</center></td> <td width=150 valign=middle bgcolor=#e5e5e5><center>$dwntime_log_by</center></td> </tr><tr><td colspan=9><hr size=1></td></tr></table>"; } $fp = fopen($filename2,"a"); if($fp) { fwrite($fp, $catanames); fwrite($fp, $data); fclose($fp); echo "File saved successfully. <a href=$filename2>click here to access $filename2</a>"; } else { echo "Error saving file!"; } [/code] this ends up looking like: [img]http://www.loaded-designs.com/images/excel.gif[/img] Can anyone help me figure out why it won't format correctly? Thanks!! - Jeff
  17. sweet - it pretty much works the way I want. How would I be able to format cells though? For example, have the cell labels in bold or something? Here is my code: [code] $cr = "\n"; $title = "TITLE" . ',' . $monthname . ',' . $year . $cr; $catanames = "Type" . ',' . "Date" . ',' . "Downtime" . ',' . "Hours Down" . ',' . "ATA" . ',' . "Discrepancy" . ',' . "Resolution" . ',' . "Logged" . ',' . "Logged By" . $cr; $data .= $dwntime_type . ',' . $dwntime_date . ',' . $dwntime_times . ',' . $dwntime_hrs . ',' . $dwntime_ata . ',' . $dwntime_reason . ',' . $dwntime_solution . ',' . $dwntime_log . ',' . $dwntime_log_by . $cr; } $fp = fopen($filename2,"a"); if($fp) { fwrite($fp, $title); fwrite($fp, $catanames); fwrite($fp, $data); fclose($fp); echo "File saved successfully. <a href=$filename.csv>click here to access $filename2</a>"; } else { echo "Error saving file!"; } [/code]
  18. Hi, I am seriously at my wit's end about this... I need to be able to click a link, which opens up a dynamically created Excel page with X number of rows and 9 columns. I am currently using a script called "excelwriter", but I can't seem to get it to work properly - that is, write all the rows into the excel file (I can only write one dynamically, which is a little useless...). So, my question would be: How would I be able to accomplish this if I rewrote the whole script? I'm talking from scratch... Also, is it possible to import my data as an HTML table to Excel? I think that would be easiest. Thanks in advance, - Jeff
  19. Thanks for your help! However, my script still doesn't work. Here it is in it's entirety - including the new stuff: [code=php:0] <?php include("excelwriter.inc.php"); $view_id = "$_SESSION[aircraft_id]"; $datename = "AMA - $year - $month"; $filename = str_replace(' ', '', $datename); include("connect.php"); $sql = "SELECT * FROM downtime WHERE aircraft_id='$view_id' AND dwntime_year='$year' AND dwntime_month='$month' ORDER BY '$listorder'"; $result = @mysql_query($sql,$connection) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { $row_id = $row['row_id']; $dwntime_type = ucfirst(stripslashes($row['dwntime_type'])); $dwntime_hrs = round($row['dwntime_hrs'], 2); $dwntime_s = $row['dwntime_start']; $dwntime_e = $row['dwntime_end']; $dwntime_ata = $row['dwntime_ata']; $dwntime_reason = stripslashes($row['dwntime_reason']); $dwntime_solution = stripslashes($row['dwntime_solution']); $dwntime_log = $row['dwntime_log']; $dwntime_log_by = stripslashes($row['dwntime_log_by']); $dwntime_day = $row['dwntime_day']; $dwntime_month = $row['dwntime_month']; $dwntime_year = $row['dwntime_year']; $dwntime_times = "$dwntime_s - $dwntime_e"; $string = "$dwntime_year - $dwntime_month - $dwntime_day"; $dwntime_date = str_replace(' ', '', $string); $therows[]=array( "<center>$dwntime_type</center>", "<center>$dwntime_date</center>", "<center>$dwntime_times</center>", "<center>$dwntime_hrs</center>", "<center>$dwntime_ata</center>", "<center>$dwntime_reason</center>", "<center>$dwntime_solution</center>", "<center>$dwntime_log</center>", "<center>$dwntime_log_by</center>"); } $excel=new ExcelWriter("$filename.xls"); if($excel==false) echo $excel->error; $x=''; foreach ($therows as $therow) { $x .= "<p>".implode('<br />',$therow)."</p>"; $y .= $excel->writeLine($therows); } $myArr=array("<b>XOJET AMA</b>","<b><i>$monthname, $year</i></b>"); $excel->writeLine($myArr); $myArr=array( "<font color=#FFFFFF>--------------------------</font>", "<font color=#FFFFFF>--------------------------</font>", "<font color=#FFFFFF>--------------------------</font>", "<font color=#FFFFFF>--------------------------</font>", "<font color=#FFFFFF>--------------------------</font>", "<font color=#FFFFFF>--------------------------</font>", "<font color=#FFFFFF>--------------------------</font>", "<font color=#FFFFFF>--------------------------</font>", "<font color=#FFFFFF>--------------------------</font>",); $excel->writeLine($myArr); $myArr=array( "<center><b>Type</b></center>", "<center><b>Date</b></center>", "<center><b>Downtime</b></center>", "<center><b>Hours Down</b></center>", "<center><b>ATA</b></center>", "<center><b>Discrepancy</b></center>", "<center><b>Resolution</b></center>", "<center><b>Logged</b></center>", "<center><b>Logged By</b></center>"); $excel->writeLine($myArr); $excel->open($filename.xls); echo "Data has been written to $filename.xls successfully. <a href=$filename.xls>Click here</a><br><hr size=1><br>$x<br><hr size=1><p>$y"; ?> [/code]
  20. Hi, I think I can work my way around a perticular problem, but I don't know how it would translate to code... This is what I want to do: - First I want to extract some information from the database (pretty easy) [code=php:0] $sql = "SELECT * FROM downtime WHERE aircraft_id='$view_id' AND dwntime_year='$year' AND dwntime_month='$month' ORDER BY '$listorder'"; [/code] - Next I want to create an array for every selected row [code=php:0] $therows .= array( <center>$dwntime_type</center>, <center>$dwntime_date</center>, <center>$dwntime_times</center>, <center>$dwntime_hrs</center>, <center>$dwntime_ata</center>, <center>$dwntime_reason</center>, <center>$dwntime_solution</center>, <center>$dwntime_log</center>, <center>$dwntime_log_by</center>); [/code] - Then I want to take each array and put some static code next to it (I know this is wrong, but you kinda get an idea) [code=php:0] $display = "$therows(but only 1 row at a time) $excel->writeLine($therows)"; [/code] - That should be it. I am going to take that $display value and process it a little later in the script to make an Excel file. Any help is greatly appreciated!
  21. yes, I do have more code... its just not relevent to it. Its kinda long, but I'll post it anyway. export.php - I changed it around a bit since last post... [code=php:0] include("excelwriter.inc.php"); include("connect.php"); $sql = "SELECT * FROM downtime WHERE aircraft_id='$view_id' AND dwntime_year='$year' AND dwntime_month='$month' ORDER BY '$listorder'"; $result = @mysql_query($sql,$connection) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { $dwntime_type = ucfirst(stripslashes($row['dwntime_type'])); $dwntime_hrs = round($row['dwntime_hrs'], 2); $dwntime_s = $row['dwntime_start']; $dwntime_e = $row['dwntime_end']; $dwntime_ata = $row['dwntime_ata']; $dwntime_reason = stripslashes($row['dwntime_reason']); $dwntime_solution = stripslashes($row['dwntime_solution']); $dwntime_log = $row['dwntime_log']; $dwntime_log_by = stripslashes($row['dwntime_log_by']); $dwntime_day = $row['dwntime_day']; $dwntime_month = $row['dwntime_month']; $dwntime_year = $row['dwntime_year']; $dwntime_times = "$dwntime_s - $dwntime_e"; $string = "$dwntime_year - $dwntime_month - $dwntime_day"; $dwntime_date = str_replace(' ', '', $string); $therows .= array("<center>$dwntime_type</center>","<center>$dwntime_date</center>","<center>$dwntime_times</center>","<center>$dwntime_hrs</center>","<center>$dwntime_ata</center>","<center>$dwntime_reason</center>","<center>$dwntime_solution</center>","<center>$dwntime_log</center>","<center>$dwntime_log_by</center>"); $display .= "$excel->writeLine($therows)"; } $excel=new ExcelWriter("$filename.xls"); if($excel==false) echo $excel->error; $myArr=array("<b>XOJET AMA</b>","<b><i>$monthname, $year</i></b>"); $excel->writeLine($myArr); $myArr=array("<center><b>Type</b></center>","<center><b>Date</b></center>","<center><b>Downtime</b></center>","<center><b>Hours Down</b></center>","<center><b>ATA</b></center>","<center><b>Discrepancy</b></center>","<center><b>Resolution</b></center>","<center><b>Logged</b></center>","<center><b>Logged By</b></center>"); $excel->writeLine($myArr); $display .= $excel->writeLine($therows); $display; $excel->open($filename.xls); echo "Data has been written into $filename.xls successfully. <a href=$filename.xls>Click here to view it</a><p>$therows"; ?> [/code] excelwriter.inc.php - written by Harish Chauhan - Edited a little by me [code=php:0] <?php Class ExcelWriter { var $fp=null; var $error; var $state="CLOSED"; var $newRow=false; function ExcelWriter($file="") {   return $this->open($file); } //////////////////////////////////////////////////////////////////////////////// // OPEN FUNCTION //////////////////////////////////////////////////////////////////////////////// function open($file) { if($this->state!="CLOSED") { $this->error="Error : Another file is open. Please close it to save the current file."; return false; } if(!empty($file)) { $this->fp=@fopen($file,"w+"); } else { $this->error="Usage : New ExcelWriter('fileName')"; return false; } if($this->fp==false) { $this->error="Error: Unable to open/create File.You may not have permmsion to write the file."; return false; } $this->state="OPENED"; fwrite($this->fp,$this->GetHeader()); return $this->fp; } //////////////////////////////////////////////////////////////////////////////// // CLOSE FUNCTION //////////////////////////////////////////////////////////////////////////////// function close() { if($this->state!="OPENED") { $this->error="Error : Please open the file."; return false; } if($this->newRow) { fwrite($this->fp,"</tr>"); $this->newRow=false; } fwrite($this->fp,$this->GetFooter()); fclose($this->fp); $this->state="CLOSED"; return ; } //////////////////////////////////////////////////////////////////////////////// // GETHEADER FUNCTION //////////////////////////////////////////////////////////////////////////////// function GetHeader() { $header = <<<EOH <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=us-ascii"> <meta name=ProgId content=Excel.Sheet> <!--[if gte mso 9]> <xml> <o:DocumentProperties>   <o:LastAuthor>Sriram</o:LastAuthor>   <o:LastSaved>2005-01-02T07:46:23Z</o:LastSaved>   <o:Version>10.2625</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings>   <o:DownloadComponents/> </o:OfficeDocumentSettings> </xml> <![endif]--> <style> <!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @page {margin:1.0in .75in 1.0in .75in; mso-header-margin:.5in; mso-footer-margin:.5in;} tr {mso-height-source:auto;} col {mso-width-source:auto;} br {mso-data-placement:same-cell;} .style0 {mso-number-format:General; text-align:general; vertical-align:bottom; white-space:nowrap; mso-rotate:0; mso-background-source:auto; mso-pattern:auto; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; border:none; mso-protection:locked visible; mso-style-name:Normal; mso-style-id:0;} td {mso-style-parent:style0; padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} .xl24 {mso-style-parent:style0; white-space:normal;} --> </style> <!--[if gte mso 9]> <xml> <x:ExcelWorkbook>   <x:ExcelWorksheets>   <x:ExcelWorksheet> <x:Name>1</x:Name> <x:WorksheetOptions> <x:Selected/> <x:ProtectContents>False</x:ProtectContents> <x:ProtectObjects>False</x:ProtectObjects> <x:ProtectScenarios>False</x:ProtectScenarios> </x:WorksheetOptions>   </x:ExcelWorksheet>   </x:ExcelWorksheets>   <x:WindowHeight>10005</x:WindowHeight>   <x:WindowWidth>10005</x:WindowWidth>   <x:WindowTopX>120</x:WindowTopX>   <x:WindowTopY>135</x:WindowTopY>   <x:ProtectStructure>False</x:ProtectStructure>   <x:ProtectWindows>False</x:ProtectWindows> </x:ExcelWorkbook> </xml> <![endif]--> </head> <body link=blue vlink=purple> <table x:str border=0 cellpadding=0 cellspacing=0 style='border-collapse: collapse;table-layout:fixed;'> EOH; return $header; } //////////////////////////////////////////////////////////////////////////////// // GETFOOTER FUNCTION //////////////////////////////////////////////////////////////////////////////// function GetFooter() { return "</table></body></html>"; } //////////////////////////////////////////////////////////////////////////////// // WRITELINE FUNCTION //////////////////////////////////////////////////////////////////////////////// function writeLine($line_arr) { if($this->state!="OPENED") { $this->error="Error : Please open the file."; return false; } if(!is_array($line_arr)) { $this->error="Error : Argument is not valid. Supply an valid Array."; return false; } fwrite($this->fp,"<tr>"); foreach($line_arr as $col) fwrite($this->fp,"<td class=xl24 width=100>$col</td>"); fwrite($this->fp,"</tr>"); } //////////////////////////////////////////////////////////////////////////////// // WRITEROW FUNCTION //////////////////////////////////////////////////////////////////////////////// function writeRow() { if($this->state!="OPENED") { $this->error="Error : Please open the file."; return false; } if($this->newRow==false) { fwrite($this->fp,"<tr>"); } else { fwrite($this->fp,"</tr><tr>"); $this->newRow=true; } } //////////////////////////////////////////////////////////////////////////////// // WRITECOL FUNCTION //////////////////////////////////////////////////////////////////////////////// function writeCol($value) { if($this->state!="OPENED") { $this->error="Error : Please open the file."; return false; } fwrite($this->fp,"<td class=xl24 width=64 >$value</td>"); } } ?> [/code] I still don't know what is wrong with my code... I've been changing around stuff and moving stuff, etc... Please help me on this! Thanks, - Jeff
  22. Hi, I have a web application that stores downtime data for aircraft. The DB works very well, but I have decided to add another feature - exporting downtime logs (according to month) to Excel. For this, I used a script called "ExcelWriter" by Harish Chauhan. However, the problem I encounter is that when I try to select multiple rows from the database, the application fails. By that I mean that it only displays one row. This is because after every row, there is supposed to be a function that writes the info from the DB to an excel row. Take a look at the code:  [code=php:0] $therows = array("<center>$dwntime_type</center>","<center>$dwntime_date</center>","<center>$dwntime_times</center>", "<center>$dwntime_hrs</center>","<center>$dwntime_ata</center>","<center>$dwntime_reason</center>", "<center>$dwntime_solution</center>","<center>$dwntime_log</center>","<center>$dwntime_log_by</center>"); } $excel=new ExcelWriter("$filename.xls"); if($excel==false) echo $excel->error; $myArr=array("<b>TITLE</b>","<b><i>$monthname, $year</i></b>"); $excel->writeLine($myArr); $myArr=array("<center><b>Type</b></center>","<center><b>Date</b></center>","<center><b>Downtime</b></center>", "<center><b>Hours</b></center>","<center><b>ATA</b></center>","<center><b>Discrepancy</b></center>", "<center><b>Resolution</b></center>","<center><b>Logged</b></center>","<center><b>Logged By</b></center>"); $excel->writeLine($myArr); $excel->writeLine($therows); $excel->open($filename.xls); [/code] If I try to use .= , I get an error. I think that if I can extract the rows and store them as seperate values, it should work... but I don't know how to do that. Anybody know what I can do? Thanks in advance, - Jeff
  23. Hi, Thanks for all the great help!! I ended up putting the times in Unix Timestamps using this method: [code] $date_a = strtotime($dwntime_hrs1); $date_b = strtotime($dwntime_hrs2); $dthrs = ($date_b-$date_a)/3600; [/code] however, my output is in decimal form - EX:, I put in 08:00 to 13:45 and got 5.75 for the difference. Is there any way to put this into a time standard format? Such as 5:45 or 5hrs and 45mins or something? Thanks again, - Jeff
  24. Hi, There is a form on my site that requires that the user types in the start time and end time of down time. If this sounds confusing, check it out: This system logs the downtime for aircraft at my company, and the user must be able to type in the time the aircraft became out of service, as well as the time the aircraft became back in service. I need the PHP to calculate the difference and insert that number (in hours) into my DB, but I'm not sure how to do this since time goes doesn't work in intervals of 100, but 60. Is there some sort of built-in fuction to deal with this? What can I do to resolve this problem? Thanks, - Jeff
×
×
  • 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.