Solved

How do i correctly insert timestamp function in php to sql server.

Posted on 2007-11-21
3
3,457 Views
Last Modified: 2013-12-12
I am using this insert statement:
          $qry = ("INSERT INTO TBL_PC (UserUID, NameIndex, NameFlag, FirstName, LastName, Gender, FaceStyle, HairStyle, HairColor, SkinColor, EyeColor, Height, FNCode, Body, MNCode, LNCode, RegDate) VALUES ($userID, 0, 0, '$charFName', '$charLName', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, date()");

how do i correctly insert a timestamp/date function (RegDate)
0
Comment
Question by:justmelat
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
messen1975 earned 175 total points
ID: 20328789
Change date() to GetDate() and give it a try.
0
 
LVL 1

Author Comment

by:justmelat
ID: 20328910
that's it messen1975:

thanks alot.
0
 
LVL 6

Expert Comment

by:messen1975
ID: 20328929
No problem :)
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question