Re: just installed

Line 58:

$result = $db->query('SHOW TABLE STATUS FROM `'.$db_name.'`') or error('Unable to fetch table status', __FILE__, __LINE__, $db->error());

Re: just installed

I've tried running 'SHOW TABLE STATUS FROM 'pnubb'' in PHPMyAdmin and I get the same error.  I've tried it on several other databases.  Do I need to turn something on in MySQL or is the version wrong?  MySQL 3.23.52  - PHP 4.2.3 - Apache 1.3.27

Re: just installed

Hmm, very odd. I doubt it's a permissions problem. What dbtype do you have defined in config.php? And what prefix?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: just installed

I've never seen these quote marks before:  FROM `'.$db_name.'`')

the ones outside of '.$db_name.' , I'm on Mac OSX and I'm wondering if I'm translating a windows character incorrectly.

Re: just installed

Try removing them :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: just installed

$db_type = 'mysql';
$db_prefix = '';

Re: just installed

Try adding the following line just above the query on line 64 in index.php:

dump('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster, f.closed FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id'.$extra.' ORDER BY c.position, cid, f.position');

And then paste the results here.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: just installed

Kennel wrote:

Try removing them smile

That didn't do anything.

Re: just installed

http://forum.quartzsitefriends.com/

Re: just installed

Hmm. I have no idea. I can't see anything wrong with this query:

SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster, f.closed FROM categories AS c INNER JOIN forums AS f ON c.id=f.cat_id WHERE c.admmod_only!='1' AND f.admmod_only!='1' ORDER BY c.position, cid, f.position

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: just installed

This stinks.  I really like your forum and I want to use it.  I stayed up all night looking for something on hotscripts.com and nothing fits my needs like yours.  I really want to make this work.

Re: just installed

what is the purpose of the SHOW TABLE STATUS query?  Could it be commented out?

Re: just installed

It calculates how many rows and how much space the DB takes up. You can safely comment it out, but if you do, comment out the whole if there.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: just installed

I'll see what it does

Re: just installed

that let me into the admin section

Re: just installed

For some reason, my system is not liking 'SHOW TABLE STATUS' and 'INNER JOIN'

Re: just installed

Do you know what version mysql you have?

Re: just installed

RNilsson wrote:

Do you know what version mysql you have?


3.23.52

Re: just installed

MySQL Manual:

You should generally not have any conditions in the ON part that are used to restrict which rows you have in the result set (there are exceptions to this rule). If you want to restrict which rows should be in the result, you have to do this in the WHERE clause.

Note that in versions before Version 3.23.17, the INNER JOIN didn't take a join_condition!

Is this relevant?

Re: just installed

I saw that in a previous post now *must get glasses smile*

I'm using Postgres on my own host (i actually just couldn't get mysql installed properly, so i went with pg istead smile

The only thing i can think of is if there's some restrictions in privileges or something, otherwise i don't have any suggestions other then to try reinstall.

Re: just installed

Kennel,

Was this developed before MySQL 3.23.17?  Is there a change in the way the joins work?

Re: just installed

I doubt it. Anyway, you're running 3.23.52 (same as this forum), so it shouldn't affect anything.

Edit: And there are no conditions in the ON part that are used to restrict rows.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: just installed

Try running a few simple JOINs from mysqladmin:

SELECT users.username, posts.poster FROM users INNER JOIN posts ON posts.poster_id=users.id

SELECT u.username, p.poster FROM users AS u INNER JOIN posts AS p ON p.poster_id=u.id

SELECT u.username, p.poster FROM users u INNER JOIN posts p ON p.poster_id=u.id

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: just installed

Kennel wrote:

Try running a few simple JOINs from mysqladmin:

SELECT users.username, posts.poster FROM users INNER JOIN posts ON posts.poster_id=users.id

SELECT u.username, p.poster FROM users AS u INNER JOIN posts AS p ON p.poster_id=u.id

SELECT u.username, p.poster FROM users u INNER JOIN posts p ON p.poster_id=u.id

SQL-query : 
SELECT users.username, posts.poster FROM users INNER JOIN posts ON posts.poster_id=users.id LIMIT 0, 30
MySQL said:
You have an error in your SQL syntax near 'ON posts.poster_id=users.id LIMIT 0, 30' at line 1

SQL-query : 
SELECT u.username, p.poster FROM users AS u INNER JOIN posts AS p ON p.poster_id=u.id LIMIT 0, 30
MySQL said:
You have an error in your SQL syntax near 'INNER JOIN posts AS p ON p.poster_id=u.id LIMIT 0, 30' at line 1

SQL-query : 
SELECT u.username, p.poster FROM users u INNER JOIN posts p ON p.poster_id=u.id LIMIT 0, 30
MySQL said:
You have an error in your SQL syntax near 'INNER JOIN posts p ON p.poster_id=u.id LIMIT 0, 30' at line 1

Re: just installed

From ssh session:

SELECT users.username, posts.poster FROM users INNER JOIN posts ON posts.poster_id=users.id

ERROR 1064: You have an error in your SQL syntax near 'ON posts.poster_id=users.id' at line 1