If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Sysdate in MySQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-15-04, 09:21
exdter exdter is offline
Registered User
 
Join Date: Aug 2003
Posts: 328
Sysdate in MySQL

I am using Dreamweaver MX as a frontend to upload data to a MySQL table. In my table there is a date field that when the user clicks submit the date will be populated automatically. Can someone tel me how to do this? Thanks.
Reply With Quote
  #2 (permalink)  
Old 03-16-04, 04:37
omiossec omiossec is offline
Registered User
 
Join Date: Jan 2003
Location: Paris, France
Posts: 320
There are several solution

First you can create a timestamp field. If you create a new record or update one, MySql will update this field with the system date.
An other solution is to use NOW() function to retreive the current date.
__________________
Olivier Miossec
--
http://www.lasso-developpeur.net/
--
Reply With Quote
  #3 (permalink)  
Old 03-16-04, 10:34
exdter exdter is offline
Registered User
 
Join Date: Aug 2003
Posts: 328
Thanks for your reply. I have the timestamp worked out to the MySQL table. Now the problem is I don't get any records returned in my VB application. Thanks again.
Reply With Quote
  #4 (permalink)  
Old 03-17-04, 02:04
trieder trieder is offline
Registered User
 
Join Date: Sep 2003
Posts: 69
I imagine part of your WHERE clause includes the date... Show us the VB code that you are using to assemble the query or the part that actually generates the date you concatenate to the end of the WHERE clause. It may be in the wrong format.
Reply With Quote
  #5 (permalink)  
Old 03-17-04, 09:07
exdter exdter is offline
Registered User
 
Join Date: Aug 2003
Posts: 328
Sorry, I had a few extra lines in there. This is what I have.

Private Sub Form_Load()

Dim rs11 As ADODB.Recordset
Dim DB11 As New ADODB.Connection
Dim ssql2 As String
ssql2 = "select * from help_desk"
DB11.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=survey"
DB11.Open
Set rs11 = New ADODB.Recordset
rs11.CursorType = adOpenKeyset
rs11.LockType = adLockOptimistic
rs11.CursorLocation = adUseClient
rs11.Open ssql2, DB11
Do Until rs11.EOF
rs11.MoveNext
Loop

Set DataGrid1.DataSource = rs11

end sub

Last edited by exdter; 03-17-04 at 13:56.
Reply With Quote
  #6 (permalink)  
Old 03-17-04, 13:14
trieder trieder is offline
Registered User
 
Join Date: Sep 2003
Posts: 69
It doesn't appear you are actually limiting the query... this doesn't seem to match up with what you want, you should be using a WHERE if you are doing a join.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On