/    Sign up×
Community /Pin to ProfileBookmark

help with php

i have a log in script is working and everything..but i want to add the date that the account was created so it can be store in my data.. can any one help

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@PineSolPirateJan 04.2007 — Add a field in your DB for it, then when they make the account do a [B]time()[/B] and stash it in there with your query. Later you can use [B]date()[/B] to get the formatting you want on it.
Copy linkTweet thisAlerts:
@NightShift58Jan 04.2007 — An alternative would be to define a [b]date[/b] field (format will be: YYYY-MM-DD) in your table and, when you insert the user, including that field in the field and values list, using the MySQL function [b]NOW()[/b] as a value for the field.

Later, when you retrieve, you can use MySQL's [b]DATE_FORMAT()[/b] to get whatever format you need.
Copy linkTweet thisAlerts:
@PineSolPirateJan 04.2007 — Good point NightShift. I need to learn my DB stuff, it's always been just a simpleton thing to me, push data in drag it out. I bet if I did life would get easier. ? Plus I imagine doing things in MySQL would be faster since it's compiled (obviously) ?
Copy linkTweet thisAlerts:
@NightShift58Jan 04.2007 — That would be a little bit off-topic, but I would say not to assume that compiled is faster.

I just had a case where using a set of built-in, compiled and optimized PHP functions was between 10 and 30 times slower than running two loops, depending on data complexity.
×

Success!

Help @jper86 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...