| 
	
 | 
 Posted by toedipper on 07/21/05 02:34 
Hello, 
 
I have the following section of php code which updates a mysql record  
from a form.  For the values of livedate and livetime I need to insert  
the current_date() and current_time() respectively. 
 
When I run the code however it falls over at the line with 
 
GetSQLValueString(current_date(), "date") 
 
The error is Fatal error: Call to undefined function: current_date() 
 
any ideas? 
 
Thanks, 
 
td 
 
 
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "frmaddsw")) { 
   $updateSQL = sprintf("UPDATE software SET title=%s, shortdesc=%s,  
`desc`=%s, version=%s, minreqs=%s, wareid=%s, catid=%s, hpage=%s,  
dllink=%s, dlsize=%s, liveyn=%s, triallength=%s, price=%s, keywords=%s,  
submitdate=%s, submittime=%s, livedate=%s, livetime=%s WHERE swid=%s", 
                        GetSQLValueString($_POST['title'], "text"), 
                        GetSQLValueString($_POST['shortdesc'], "text"), 
                        GetSQLValueString($_POST['desc'], "text"), 
                        GetSQLValueString($_POST['version'], "text"), 
                        GetSQLValueString($_POST['minreqs'], "text"), 
                        GetSQLValueString($_POST['wareid'], "int"), 
                        GetSQLValueString($_POST['catid'], "int"), 
                        GetSQLValueString($_POST['hpage'], "text"), 
                        GetSQLValueString($_POST['dllink'], "text"), 
                        GetSQLValueString($_POST['dlsize'], "text"), 
                        GetSQLValueString($_POST['liveyn'], "text"), 
                        GetSQLValueString($_POST['triallength'], "text"), 
                        GetSQLValueString($_POST['price'], "double"), 
                        GetSQLValueString($_POST['keywords'], "text"), 
                        GetSQLValueString($_POST['submitdate'], "date"), 
                        GetSQLValueString($_POST['submittime'], "date"), 
// falls over here  
GetSQLValueString(current_date(), "date"), 
                        GetSQLValueString(current_time(), "date"), 
                        //GetSQLValueString($_POST['livedate'], "date"), 
                        //GetSQLValueString($_POST['livetime'], "date"), 
                        GetSQLValueString($_POST['swid'], "int"));
 
  
Navigation:
[Reply to this message] 
 |