The MU forums have moved to WordPress.org

Install: SQL syntax near '()' at line 1 (10 posts)

  1. newquest
    Member
    Posted 17 years ago #

    This is the error I got. I double my database: the tables are created, the post is created. But it seems that I cannot create new post.

    "WordPress database error: [You have an error in your SQL syntax near '.* FROM wp_1_posts WHERE 1=1 AND (post_type = 'post' AND (post_status = 'publi' at line 1]
    SELECT SQL_CALC_FOUND_ROWS wp_1_posts.* FROM wp_1_posts WHERE 1=1 AND (post_type = 'post' AND (post_status = 'publish')) ORDER BY post_date DESC LIMIT 0, 10

    WordPress database error: [You have an error in your SQL syntax near '()' at line 1]
    SELECT FOUND_ROWS()"

    My blog is at http://www.yo.sg
    Kindly assist.

  2. newquest
    Member
    Posted 17 years ago #

    Sorry, missed this out. When I create new blog, I get this message.

    I am using version 1.1.1

    "WordPress database error: [Table 'a1.wp_3_options' doesn't exist]
    SELECT option_value FROM wp_3_options WHERE option_name = 'wp_3_user_roles' LIMIT 1

    WordPress database error: [Table 'a1.wp_3_options' doesn't exist]
    SELECT option_value FROM wp_3_options WHERE option_name = 'blogname' LIMIT 1

    WordPress database error: [Table 'a1.wp_3_options' doesn't exist]
    SELECT option_value FROM wp_3_options WHERE option_name = 'siteurl' LIMIT 1

    WordPress database error: [Table 'a1.wp_3_options' doesn't exist]
    SELECT option_value FROM wp_3_options WHERE option_name = 'post_count' LIMIT 1

    Warning: Cannot modify header information - headers already sent by (output started at /home/webadmin/yo.sg/html/wp-includes/wp-db.php:135) in /home/webadmin/yo.sg/html/wp-includes/pluggable.php on line 334"

  3. lunabyte
    Member
    Posted 17 years ago #

  4. newquest
    Member
    Posted 17 years ago #

    Sorry,
    I did search the whole morning, but can't seems to find the solution.

    http://mu.wordpress.org/forums/topic.php?id=2477

    http://mu.wordpress.org/forums/topic.php?id=1514#post-8372

    are some of the posts I have read.

    Can you be a kind soul and tell me what to search for and which one is the correct solution?

    Thanks.

  5. newquest
    Member
    Posted 17 years ago #

    I have found another thread:

    http://trac.mu.wordpress.org/ticket/184#comment:2

    But still does not help.
    Think I am not good enough with all this code stuff.
    Can anyone help, please?

  6. drmike
    Member
    Posted 17 years ago #

    Not sure about the first post but the second one is a known issue that has been talked about many times already. Searching for the error message pulls up a number of threads on the topic. Donncha is aware of the issue and we are awaiting a fix. The blog still gets created though. It's just an error on output.

    As to your first post, maybe if you walked us though how you got the error with specifics, we could help. I've got folks posting fine on my installs.

  7. newquest
    Member
    Posted 17 years ago #

    Thanks for the reply. Been trying really hard. Got rid of the error only by installing an earlier version of mu.

    Using the 1.1.1 version:
    Uploaded the files. CHMOD the right directory.
    Went to my site http://www.yo.sg

    Filled in the database name, etc
    Then got this message: "Congrats! Your WPMU site has been set up and you have been sent details of your login and password in an email."

    Then, when I got to the next page:

    "WordPress database error: [You have an error in your SQL syntax near '.* FROM wp_1_posts WHERE 1=1 AND ..." is shown.

    Logging in with admin is ok. But cannot manage post.
    When I hit manage post, I see

    "WordPress database error: [You have an error in your SQL syntax near '.* FROM wp_1_posts WHERE 1=1 AND (post_type = 'post' AND (post_status = 'publi' at line 1]
    SELECT SQL_CALC_FOUND_ROWS wp_1_posts.* FROM wp_1_posts WHERE 1=1 AND (post_type = 'post' AND (post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'private')) ORDER BY post_date DESC LIMIT 0, 15

    WordPress database error: [You have an error in your SQL syntax near '()' at line 1]
    SELECT FOUND_ROWS()

    "

    I am using a VPS hosting package, mysql-3.23.58, HPS complete control panel.

    Any clues?

  8. newquest
    Member
    Posted 17 years ago #

    Sorry for double posting, think I got the answer,
    mysql is 3.23

    think it needs 4.1 to do it without error.

  9. lunabyte
    Member
    Posted 17 years ago #

    Sounds like it might be an issue with MySQL, specifically. Maybe try upgrading it to 4.1?

    If I remember correctly, 2.2 is going to be leaving the MySQL 3 world and require MySQL 4+. Since MU is at the cutting edge of 2.2, it's possible that is the problem.

    I can't say for sure, but if it isn't a problem right now it will be pretty soon.

  10. drmike
    Member
    Posted 17 years ago #

    Last I heard they were still trying to decide.

    But considering that regular states 4.0 is a requirment, I'd also say that's probably the issue:

    http://wordpress.org/about/requirements/

About this Topic