Chickenz Posted December 30, 2004 Report Share Posted December 30, 2004 Scirpts izmanto mysql db, proba taada ka nesaprotu kaapeec nedzeesh aaraa vecos ierakstus... MOZGAS NESTRAADAA nevaru izdomaat... plz paskatieties no malas un pasakiet kur ir kljuuda... function online(){ $expire = time() - 60; $rezultats=mysql_query("DELETE FROM online WHERE stamp < $expire"); $ip = getenv("REMOTE_ADDR"); $rezultats=mysql_query("SELECT * FROM online WHERE ip = '$ip'"); $tagadtime = time(); if(mysql_num_rows($rezultats)>0){$rezultats=mysql_query("UPDATE online SET stamp = $tagadtime WHERE ip = '$ip'");} else{$rezultats=mysql_query("INSERT INTO online VALUES ('$ip', $tagadtime)");} $online_sql=mysql_query("SELECT * FROM online"); $online = intval(mysql_num_rows($online_sql)); echo '.: Onlainā: <b>'.$online.'</b> :.'; } Ps. db connecting ir atsevishkji - ar to probleemu nav! Ierakstiit vinjsh ieraxta db tachu nedzeesh aaraa vecos... :( Link to comment Share on other sites More sharing options...
justus Posted December 30, 2004 Report Share Posted December 30, 2004 $rezultats=mysql_query("DELETE FROM online WHERE stamp < $expire"); tad skaties sito rindinju, varbuut te lieliec DELETE * FROM, ierubii php.ini lai raada mysql error mesages. Link to comment Share on other sites More sharing options...
Chickenz Posted December 30, 2004 Author Report Share Posted December 30, 2004 Stulbums ta taads ka lapa staav uz cita servera kur man nav piekjluves konfiguraacijas failiem... :( VAINAI IR JAABUUT SCRIPTAA... BET KUR??? ieliku delete * From tachu tik un taa neiet.. :( Link to comment Share on other sites More sharing options...
justus Posted December 30, 2004 Report Share Posted December 30, 2004 Stulbums ta taads ka lapa staav uz cita servera kur man nav piekjluves konfiguraacijas failiem... :( uz tava PC taksh ganjau arii ir php un mysql meegini tur vispirms Link to comment Share on other sites More sharing options...
Chickenz Posted December 30, 2004 Author Report Share Posted December 30, 2004 Probleema taada ka ar mysql viss ir kaartiibaa, probleema ir scriptaa... BET KUR??? Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 30, 2004 Report Share Posted December 30, 2004 (edited) $expire = time() - 60; $rezultats=mysql_query("DELETE FROM online WHERE stamp < $expire"); vai tev stamp = unisksiskais vai sql timestamps taas ir divas atskiriigas lietas ;) liidz ar to nekad rezultaats neizpildiisies :) vai nav taa 20041230180251<1104458698 tobish SQL timestamps nekad nebuus mazaaks pa Uniksisko timestampu ;) P.S. es domaju tieshi vai baazee naff noraadiitc ka tas ir SQL timestamps :) Edited December 30, 2004 by Grey_Wolf Link to comment Share on other sites More sharing options...
Recommended Posts