Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2005, 12:19 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default curdate()

<%
set rs=con.execute("update authusers set date = curdate() and time = curtime() where agencyid = 'MK'")
%>

Should this work?


__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old January 19th, 2005, 12:29 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

First of all which database are you using, Access or MS SQL, MySQL or..? also update query syntax should be

UPDATE <table name>
SET <column> = <value>, <column2> = <value2>...
WHERE <restrictive condition>
 
Old January 19th, 2005, 12:36 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

MySQL DB. should it work with a comma instead of an 'annd' to seperate the sets?

 
Old January 19th, 2005, 12:57 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

***
should it work with a comma instead of an 'annd' to seperate the sets?
**
I think so..do you intend to store current date time (timestamp)?
update syntax in MySQL online manual
------------
UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
    SET col_name1=expr1 [, col_name2=expr2 ...]
    [WHERE where_definition]
    [ORDER BY ...]
    [LIMIT row_count]
------------------------------
 
Old January 19th, 2005, 01:16 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

UPDATE <table name>
SET <column> = <value>, <column2> = <value2>...
WHERE <restrictive condition>

Worked perfectly.

Thanks for your efforts.

Picco






Similar Threads
Thread Thread Starter Forum Replies Last Post
curdate() curtime() crmpicco MySQL 2 December 8th, 2006 05:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.