CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Using mysql now() function for true record insert/update datetime stamp

Print topic Send  topic

Author Message
BlakeSeven
Posted: 02/18/2004, 2:36 PM

Sometimes you may find it better to use the MySQL now() function to get your datetime stamp, than using the CCS code generated timestamp.

I was eventually able to find the answer in the CCS documentation under the heading, Dynamically Modify the SQL Statement.

I was able to use the example there to do the same with an Insert statement using Before Execute Insert, and placing in this custom code.

//Custom Code @59-5F6DD002
// -------------------------
global $builds;
$builds->ds->SQL = str_replace("INSERT INTO builds (", "INSERT INTO builds (bld_recorddatetime, ", $builds->ds->SQL);
$builds->ds->SQL = str_replace(") VALUES (", ") VALUES (now(), ", $builds->ds->SQL);
// -------------------------
//End Custom Code

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.