?
Solved

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

Posted on 2007-11-21
3
Medium Priority
?
3,479 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 700 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month16 days, 18 hours left to enroll

864 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