Sephy Posted June 19, 2008 Report Share Posted June 19, 2008 Tatad gribetos saglabat datumu kad lietotajs ir registrejies tapec uztaisiju date lauku tabulaa! Ir kads jau gatavs skripts kas automatiski panem teiksim laiku no sistēmas un ieraxta kad lietotajs reģistrējies?! Link to comment Share on other sites More sharing options...
andrisp Posted June 19, 2008 Report Share Posted June 19, 2008 INSERT INTO users (name, pass, ..., date) VALUES ('janka', '3fd33d....', ..., NOW()) Link to comment Share on other sites More sharing options...
Sephy Posted June 19, 2008 Author Report Share Posted June 19, 2008 (edited) NOW() tiehsi tas kas vajadzigs paldies! edit:datums nepievienoja ;[ <?php $insert = "INSERT INTO news (newsname,newstext,createnew) VALUES ('".$_POST['title']."', '".$_POST['add']."', '"NOW()"')"; $add_member = mysql_query($insert); ?> Edited June 19, 2008 by Sephy Link to comment Share on other sites More sharing options...
Paulinjsh Posted June 19, 2008 Report Share Posted June 19, 2008 vispār jau vajadzētu manuprāt ne tikai datumu (date) glabāt, bet gan datums + laiks (datetime). Link to comment Share on other sites More sharing options...
andrisp Posted June 19, 2008 Report Share Posted June 19, 2008 Un NOW() ir funkcija. Tā nav jāliek pēdiņās. Link to comment Share on other sites More sharing options...
Recommended Posts