Solved

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

Posted on 2007-11-21
3
3,451 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

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now