In the last episode (Apr 21), Vincente Aggrippino said:
> The following query runs fine on my test server at home, running
> MySQL 5.0.15, but on my hosting provider's server, running MySQL
> 4.0.24, it gets a syntax error.  Can anyone help me figure out why?
> ...
> 
> insert into product (name, url, cost, purchase_dt)
> values('Whatchamacallit', 'http://www.whatchamacallit.com', 50000,
> str_to_date('2006-04-20', '%Y-%m-%d'))
> 
> Here's the error message :
> #1064 - You have an error in your SQL syntax.  Check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near '('2006-04-20', '%Y-%m-%d'))' at line 2

>From the manual:

 *  STR_TO_DATE(str,format)  

 STR_TO_DATE() is available as of MySQL 4.1.1. 

http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html


-- 
        Dan Nelson
        [EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to