This is a discussion on converting mysql 4 statements to mysql 5 within the MySQL forums, part of the Database Server Software category; --> Hi, I have few mysql4 statements that I would like to convert to mysql 5 format. As you can ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I have few mysql4 statements that I would like to convert to mysql 5 format. As you can tell, I am not a programmer. Any help will be highly appreciated. Thanks CREATE TABLE resume ( id INT UNSIGNED AUTO_INCREMENT, ip_addr INT UNSIGNED NOT NULL, counter INT UNSIGNED NOT NULL, last_update DATETIME NOT NULL,default 'now()', PRIMARY KEY ( id ), ); Whenever I execute it, I get syntax error with the defaul 'now()' , after doing some research I found that this now() function has been replaced. Help!!!! Thanks in advance! |
| |||
| On 27 Sep, 08:54, secSwami <parvind...@gmail.com> wrote: | I have few mysql4 statements that I would like | to convert to mysql 5 format. This statement fails in version 4 as well. Have you thought of reading the relevant section of the manual and following the instructions? I don't think the format of this statement has changed between the versions. | after doing some research I found that this now() | function has been replaced. It has? What research did you do? No one told me that it had been replaced and it appears that no one told the developers either since I am still using it in version 5 and so are lots of other people. |
| ||||
| On Thu, 27 Sep 2007 00:54:28 -0700, secSwami <parvinderb@gmail.com> wrote: >Hi, > >I have few mysql4 statements that I would like to convert to mysql 5 >format. As you can tell, I am not a programmer. Any help will be >highly appreciated. > >Thanks > >CREATE TABLE resume ( > id INT UNSIGNED AUTO_INCREMENT, > ip_addr INT UNSIGNED NOT NULL, > counter INT UNSIGNED NOT NULL, > last_update DATETIME NOT NULL,default 'now()', > > PRIMARY KEY ( id ), > >); > >Whenever I execute it, I get syntax error with the defaul 'now()' , >after doing some research I found that this now() function has been >replaced. 1: One comma too many 2: qouted 'now()' is a string, not a function call. In other words, instead of: NOT NULL,default 'now()', try: NOT NULL default now(), >Help!!!! > >Thanks in advance! Regards, -- ( Kees ) c[_] The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (George Bernard Shaw) (#467) |
| Thread Tools | |
| Display Modes | |
|
|