Ignore:
Timestamp:
Oct 30, 2012, 6:51:08 PM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Pokud je položky v databázi typu čas nastavena na NULL, tak ji zobrazuj jako prázdnou ve výpisech.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Global.php

    r452 r455  
    277277}
    278278
    279 function MysqlDateTimeToTime($Time)
    280 {
    281   $Parts = explode(' ', $Time);
     279function MysqlDateTimeToTime($DateTime)
     280{
     281  if($DateTime == '') return(0);     
     282  $Parts = explode(' ', $DateTime);
    282283  $DateParts = explode('-', $Parts[0]);
    283284  $TimeParts = explode(':', $Parts[1]);
     
    286287}
    287288
    288 function MysqlDateToTime($Time)
    289 {
    290   return(MysqlDateTimeToTime($Time.' 0:0:0')); 
     289function MysqlDateToTime($Date)
     290{
     291  if($Date == '') return(0);
     292  return(MysqlDateTimeToTime($Date.' 0:0:0')); 
    291293}
    292294
    293295function MysqlTimeToTime($Time)
    294296{
     297  if($Time == '') return(0);
    295298  return(MysqlDateTimeToTime('0000-00-00 '.$Time)); 
    296299}
Note: See TracChangeset for help on using the changeset viewer.