tk1 Posted October 26, 2007 Report Share Posted October 26, 2007 Sveiki! Piemēram tabula datubāzē ar nosaukumu amxb! Sadaļas nick pass un flag! Dažiem flag ir abcdef.... bet citiem tikai b! var izdarīt ka tiem kuriem tikai b idzēshas pēc 1 mēnesha kopš ierakstīti tabulā? ļoti vajag...plizzz Link to comment Share on other sites More sharing options...
martins256 Posted October 26, 2007 Report Share Posted October 26, 2007 uztaisi lauku ar datumu, kurā ir laiks kad izdzēst un cron iebaro skriptu, kas pārbauda vai nav pienacis laiks dzēst... Link to comment Share on other sites More sharing options...
tk1 Posted October 26, 2007 Author Report Share Posted October 26, 2007 (edited) labi datumus kā sataisīshu cron = crontab? Kā izskatīsies tas skripts kas pārbauda? kods http://paste.php.lv/6318 itkā pie post steam id ierakstiju to date("Y.m.d"); bet tadums tabulā kā nav tā nav! KPc mb kādus tut? Esmu iesācējs! visur ir 0000-00-00 Edited October 26, 2007 by tk1 Link to comment Share on other sites More sharing options...
martins256 Posted October 26, 2007 Report Share Posted October 26, 2007 phpvideotutorials.com var daudz ko iemācīties. Un arī tās lietas, kas tev būtu vajadzīgas! crontab derēs, ja tev ir linux, ja uz win stāv serveris, tad iesaku VisualCron Tev no tā būs vajadzīgs http request visdrīzāk... Link to comment Share on other sites More sharing options...
andrisp Posted October 27, 2007 Report Share Posted October 27, 2007 Skriptu jau var palaist arī ar CLI (tas ir - no komandrindsas - php.exe skripts.php). Pārbaudi varētu veikt kverijā ar LIKE: DELETE FROM table WHERE flag LIKE"%b%" AND date <= [datums_pirms_meenesha] http://dev.mysql.com/doc/refman/5.0/en/regexp.html http://dev.mysql.com/doc/refman/5.0/en/dat...-functions.html Link to comment Share on other sites More sharing options...
localhero Posted October 27, 2007 Report Share Posted October 27, 2007 (edited) Isti neizprotu tavu vajadzibu bet ka butu ar: Izveidojot b ierakstu, izveidojam sekojosus ierakstus datu baze: 1)f = current timestamps 2)h = current timestamps pec menesa Pirms php scripts ko dara ar b datiem parbauda vai h > tagad vai h < tagad. Respektivi ja b ir pagajis uzskatam vinu par izdzestu. Edited October 28, 2007 by localhero Link to comment Share on other sites More sharing options...
aldis Posted October 28, 2007 Report Share Posted October 28, 2007 Nu tas vislabakais variants.. jo tieshi pec menesha nepanaksi ka jams pazudis! Kadam vajag iedarbinat skriptu no aras lai pazustu.. tik pat labu tas varetu but tu pac ka admins! Otrkart.. taa lapa kas nolasa datubazes informaciju, varetu izchekot... vai jau menesi vecs ieraksts.. vai ne! :) Un ja vecs.. tad dzesh lauka! Pec shita virziena vari meklet googlee funkcijas un darbibas principu! :) '".$_POST['date("Y.m.d")']."' <<< es k-kaa nesaprotu sito pierakstu... bet nu lai paliek ja ir ok... tava vieta es nolasitu vnk.. $date = date("d.m.Y. G:i:s"); un tad ar tadu variabli njemtos. Link to comment Share on other sites More sharing options...
tk1 Posted October 28, 2007 Author Report Share Posted October 28, 2007 tur tā lieta ka '".$_POST['date("Y.m.d")']."' neiet rāda 00-00-00! kpc? ko kā jāmaina?.. Link to comment Share on other sites More sharing options...
localhero Posted October 28, 2007 Report Share Posted October 28, 2007 (edited) Norādi MySQL lauku "laiks" kā TIMESTAMP un lauku "laiks_pec_menesa" kā TIMESTAMP vērtība + mēnesis Ko tu tur ar to POST megināji ? Iedod scriptu apskatit. Edited October 28, 2007 by localhero Link to comment Share on other sites More sharing options...
tk1 Posted October 28, 2007 Author Report Share Posted October 28, 2007 kods http://paste.php.lv/6318 Link to comment Share on other sites More sharing options...
localhero Posted October 28, 2007 Report Share Posted October 28, 2007 kas ir steamid ? Un kāda ir datu bāzes struktūra ? Un vispār iesaku pašam mēģināt izprast to scriptu, uzrakstīt struktūru ar visiem operatoriem if else utt. tad arī radīsies skaidrība. Link to comment Share on other sites More sharing options...
aldis Posted October 28, 2007 Report Share Posted October 28, 2007 Nezinu kas tas par Post... k-kaa neskiet pareiza ideja jamo k-kur postot.. :D vnk.. taa vietaa ievadiit variabli shitadu nevari? // vispimrs nosaki datumu $date = date("Y.m.d.") //un peec tam taa post vietaa izmanto '.$date.' Cik saprotu unixiem prieksh timestampa jau ir gatavs shads variablis... nezinu ka tas strada.. $_SERVER['REQUEST_TIME'] palasit vari ieksh manualja http://lv2.php.net/date Link to comment Share on other sites More sharing options...
Recommended Posts