close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

sql issue.

Thread began 11/02/2009 2:21 pm by paul372337 | Last modified 11/13/2009 4:21 pm by Eric Mittman | 4717 views | 16 replies |

paul372337

sql issue.

When I run the prepackaged cms.sql file , I get the following error:

ERROR 1064 at line 2: 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 'CURRENT_TIMESTAMP,
PRIMARY KEY (`HistoryID`)
)' at line 7

Any help would be appreciated, thanks!

Sign in to reply to this post

Eric Mittman

What is the version of MySQL that you are working with? If the code does not like the default value then the version could be an issue. Please post back with this info so we can look into this issue more.

Sign in to reply to this post

paul372337

Originally Said By: Eric Mittman
  What is the version of MySQL that you are working with? If the code does not like the default value then the version could be an issue. Please post back with this info so we can look into this issue more.  



I cannot seem to get the version of SQL from my customer's host. :(

Is there an SQL query to retrieve that information?

Sign in to reply to this post

paul372337

According to phpinfo(), my customer's host has a client api version of 4.0.27?

Sign in to reply to this post

Eric Mittman

I have done some looking around and cannot determine why you are getting this error when attempting to load the sql file.

One potential work around would be to use the function call version of this default value, it would look like this in the sql:

`HistoryDate` timestamp NOT NULL default CURRENT_TIMESTAMP(),

If this gives you the same error you should just remove the default clause here, then after the table is created you can go back after the fact and update the columns default value to be the current_timestamp. Please give this a try and let me know how it works for you.

Sign in to reply to this post

paul372337

Still gives this:

ERROR 1064 at line 2: 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 'CURRENT_TIMESTAMP(),
PRIMARY KEY (`HistoryID`)
)' at line 7

Sign in to reply to this post

Eric Mittman

You should just remove the default clause here, then after the table is created you can go back after the fact and update the columns default value to be the current_timestamp.

The part you need to remove is this:
default CURRENT_TIMESTAMP()

Please give this a try and let me know how it works for you.

Sign in to reply to this post

paul372337

That did it!

Although without myphpadmin I'm not sure where/how to add the value to the column after the fact. Will the software work fine without this? It appears to be working at the present without it, but I also have not pushed it in depth.

Sign in to reply to this post

Eric Mittman

It is a fairly important part for retaining the versions of the pages you are creating. Without this timestamp in this field you will have trouble checking the history of a page and reverting back to it. Does your GUI tool allow you to edit the table like this? If you are using phpmyadmin you should be able to alter the table by adding in the default value for this column. The version of MySQL that you are using may be part of the problem but I was not able to confirm this in my searching.

Sign in to reply to this post

paul372337

My server does not have myphpadmin (that's what I was attempting to say earlier) or anything of the sort. It sends me to a page on the mysql website that no longer exists to get some form of admin tool and tells me what port I can connect on, but that's as far as it goes.

However, it appears to be pulling the timestamp anyway.

I'm currently facing a different problem, now, the php echo of the content seems to be breaking the site at the line where the php echo goes. [Edit: To clarify, the site is cropped beginning at the line with the php echo WA_getblahblahblah(args); command, losing the rest of the site. It's as if the WA_getblah(args) method is failing and php times out waiting on it to fail.]

index.php

I set this up on another customer site (one that I host) and it appears to be working just fine, so I'm fairly stumped.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...