Inside07 Posted November 25, 2004 Report Share Posted November 25, 2004 Sveiki ir lapa, kuraa notiek prechu rezerveeshana, bet lai lietotaaji redzeetu, kad prece ir rezerveeta un uz cik ilgu laiku vajag katrai precei kalendaaru, kur rezervetas dienas tiktu ieziimeetas citaas kraasaas. Idejiski process kaa to realizeet man ir skaidrs, bet tehniski pagaidaam veel tik taalu neesu izaudzis ieksh php un sql. varbuut kaads var dot kaadu sakariigu padomu, varbuut uz kaadiem gataviem risinaajumiem kaadu noraadi? Jav ieprieksh paldies Link to comment Share on other sites More sharing options...
Venom Posted November 25, 2004 Report Share Posted November 25, 2004 visvienkāršākais, izvadīt mēneša datumus bez nedēļu u.c. sadalījumu, e.g. SELECT DAYOFMONTH(reserve_start) as `dom_s`,DAYOFMONTH(reserve_end) as `dom_e` FROM preces WHERE MONTH(reserved)=MONTH(NOW()); $rd=array(); $tmp=date('j')+1; while(--$tmp) $rd[$tmp]=$tmp; ksort($tmp); while ... mysql_fetch_assoc ... { $tmp=$m->f['dom_e']+1; $m->f['dom_s']-=1; while(--$tmp>$m->f['dom_s']) $rd[$tmp]='<b>'.$tmp.'</b>'; } echo implode(' | ',$rd); Link to comment Share on other sites More sharing options...
Inside07 Posted November 26, 2004 Author Report Share Posted November 26, 2004 Dariiju kaa Venom ieteica, bet izmet sekojosho warningu: Warning: ksort() expects parameter 1 to be array, integer given in kas vareetu buut shim par iemeslu ? Link to comment Share on other sites More sharing options...
Venom Posted November 26, 2004 Report Share Posted November 26, 2004 nu - bē, tāpēc ka nodevu $tmp, nevis $rd kā parametru pasteidzos Link to comment Share on other sites More sharing options...
bubu Posted November 26, 2004 Report Share Posted November 26, 2004 Warning: ksort() expects parameter 1 to be array, integer given in Angļu valodu nezini? Brīdinājums: ksor() sagaida masīvu kā 1. parametru, bet tik nodots vesels skaitlis. Link to comment Share on other sites More sharing options...
Recommended Posts