MySQL Query error on admin login

Guys, after HOURS of tryin, on a Dreamhost server (!?*!), I think I got it!

It connects to the database, I can see the new tables in myphpadmin as proof, then "set.php?create" pops up. Two options here to click on: view galleries (empty obviously) or admin option. I click admin and then just this appears:

"MySQL Query ( SELECT * FROM as-albums ) Failed. Error: 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 'as-albums' at line 1"

In zp-config.php I'm adding the table prefix "as" 'cause I'm using my Wordpress database for Zenphoto too. (a good thing ???).

I've searched the forum, but nothing I could see had this error.

Any ideas Trisweb or others reading this?

Thanks in advance and keep up the good work!

Comments

  • julandy-

    as a dreamhost user myself, it makes much more sense to segregate your zenphoto DB from other DBs. on dreamhost, you can set up many MySQL DBs, so you don't have to worry about limitations. that way you don't have to worry about mixing prefixes,etc.

    so what i do, is have a wordpress DB, and a separate DB for zenphoto. it's just easier that way.

    However, if you do want to continue to use the prefixed DB, you should nose around in the zp-config.php file. Look for:

    `// If you're sharing the database with other tables, use a prefix to be safe.

    $conf['mysql_prefix'] = "";`

    in the code, and set that to your prefix.
  • trisweb Administrator
    But in fact, the actual problem is the use of a dash in your prefix. They're not allowed :-) Try using an undersore _ instead.

    (as a side-note, the would be allowed if we used backquotes for the table names, but we don't... maybe we should, but I think "no dashes" works out :-)
  • Thanks guys, good work!

    Trisweb: you're ofcourse right. Changed - to _ on the prefix and all OK. Admin screen now showing.

    Thinkdreams: Thanks for the DB advice re. Wordpress. If http://www.thinkdreams.com/ is yours....good work !! A great lookin site.

    Thanks again!
Sign In or Register to comment.